Loading MAINTAINERS +1 −0 Original line number Diff line number Diff line Loading @@ -10369,6 +10369,7 @@ F: include/linux/isapnp.h ISCSI M: Lee Duncan <lduncan@suse.com> M: Chris Leech <cleech@redhat.com> M: Mike Christie <michael.christie@oracle.com> L: open-iscsi@googlegroups.com L: linux-scsi@vger.kernel.org S: Maintained Loading drivers/message/fusion/mptbase.c +2 −2 Original line number Diff line number Diff line Loading @@ -6658,13 +6658,13 @@ static int mpt_summary_proc_show(struct seq_file *m, void *v) static int mpt_version_proc_show(struct seq_file *m, void *v) { u8 cb_idx; int scsi, fc, sas, lan, ctl, targ, dmp; int scsi, fc, sas, lan, ctl, targ; char *drvname; seq_printf(m, "%s-%s\n", "mptlinux", MPT_LINUX_VERSION_COMMON); seq_printf(m, " Fusion MPT base driver\n"); scsi = fc = sas = lan = ctl = targ = dmp = 0; scsi = fc = sas = lan = ctl = targ = 0; for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { drvname = NULL; if (MptCallbacks[cb_idx]) { Loading drivers/scsi/aha152x.c +113 −122 Original line number Diff line number Diff line Loading @@ -317,14 +317,18 @@ enum { }; struct aha152x_cmd_priv { struct scsi_pointer scsi_pointer; char *ptr; int this_residual; struct scatterlist *buffer; int status; int message; int sent_command; int phase; }; static struct scsi_pointer *aha152x_scsi_pointer(struct scsi_cmnd *cmd) static struct aha152x_cmd_priv *aha152x_priv(struct scsi_cmnd *cmd) { struct aha152x_cmd_priv *acmd = scsi_cmd_priv(cmd); return &acmd->scsi_pointer; return scsi_cmd_priv(cmd); } MODULE_AUTHOR("Jürgen Fischer"); Loading Loading @@ -890,17 +894,16 @@ void aha152x_release(struct Scsi_Host *shpnt) static int setup_expected_interrupts(struct Scsi_Host *shpnt) { if(CURRENT_SC) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); scsi_pointer->phase |= 1 << 16; acp->phase |= 1 << 16; if (scsi_pointer->phase & selecting) { if (acp->phase & selecting) { SETPORT(SSTAT1, SELTO); SETPORT(SIMODE0, ENSELDO | (DISCONNECTED_SC ? ENSELDI : 0)); SETPORT(SIMODE1, ENSELTIMO); } else { SETPORT(SIMODE0, (scsi_pointer->phase & spiordy) ? ENSPIORDY : 0); SETPORT(SIMODE0, (acp->phase & spiordy) ? ENSPIORDY : 0); SETPORT(SIMODE1, ENPHASEMIS | ENSCSIRST | ENSCSIPERR | ENBUSFREE); } } else if(STATE==seldi) { Loading @@ -924,17 +927,16 @@ static int setup_expected_interrupts(struct Scsi_Host *shpnt) static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, struct completion *complete, int phase) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(SCpnt); struct aha152x_cmd_priv *acp = aha152x_priv(SCpnt); struct Scsi_Host *shpnt = SCpnt->device->host; unsigned long flags; scsi_pointer->phase = not_issued | phase; scsi_pointer->Status = 0x1; /* Ilegal status by SCSI standard */ scsi_pointer->Message = 0; scsi_pointer->have_data_in = 0; scsi_pointer->sent_command = 0; acp->phase = not_issued | phase; acp->status = 0x1; /* Illegal status by SCSI standard */ acp->message = 0; acp->sent_command = 0; if (scsi_pointer->phase & (resetting | check_condition)) { if (acp->phase & (resetting | check_condition)) { if (!SCpnt->host_scribble || SCSEM(SCpnt) || SCNEXT(SCpnt)) { scmd_printk(KERN_ERR, SCpnt, "cannot reuse command\n"); return FAILED; Loading @@ -957,15 +959,15 @@ static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, SCp.phase : current state of the command */ if ((phase & resetting) || !scsi_sglist(SCpnt)) { scsi_pointer->ptr = NULL; scsi_pointer->this_residual = 0; acp->ptr = NULL; acp->this_residual = 0; scsi_set_resid(SCpnt, 0); scsi_pointer->buffer = NULL; acp->buffer = NULL; } else { scsi_set_resid(SCpnt, scsi_bufflen(SCpnt)); scsi_pointer->buffer = scsi_sglist(SCpnt); scsi_pointer->ptr = SG_ADDRESS(scsi_pointer->buffer); scsi_pointer->this_residual = scsi_pointer->buffer->length; acp->buffer = scsi_sglist(SCpnt); acp->ptr = SG_ADDRESS(acp->buffer); acp->this_residual = acp->buffer->length; } DO_LOCK(flags); Loading Loading @@ -1015,7 +1017,7 @@ static void reset_done(struct scsi_cmnd *SCpnt) static void aha152x_scsi_done(struct scsi_cmnd *SCpnt) { if (aha152x_scsi_pointer(SCpnt)->phase & resetting) if (aha152x_priv(SCpnt)->phase & resetting) reset_done(SCpnt); else scsi_done(SCpnt); Loading Loading @@ -1101,7 +1103,7 @@ static int aha152x_device_reset(struct scsi_cmnd * SCpnt) DO_LOCK(flags); if (aha152x_scsi_pointer(SCpnt)->phase & resetted) { if (aha152x_priv(SCpnt)->phase & resetted) { HOSTDATA(shpnt)->commands--; if (!HOSTDATA(shpnt)->commands) SETPORT(PORTA, 0); Loading Loading @@ -1395,31 +1397,30 @@ static void busfree_run(struct Scsi_Host *shpnt) SETPORT(SSTAT1, CLRBUSFREE); if(CURRENT_SC) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); #if defined(AHA152X_STAT) action++; #endif scsi_pointer->phase &= ~syncneg; acp->phase &= ~syncneg; if (scsi_pointer->phase & completed) { if (acp->phase & completed) { /* target sent COMMAND COMPLETE */ done(shpnt, scsi_pointer->Status, DID_OK); done(shpnt, acp->status, DID_OK); } else if (scsi_pointer->phase & aborted) { done(shpnt, scsi_pointer->Status, DID_ABORT); } else if (acp->phase & aborted) { done(shpnt, acp->status, DID_ABORT); } else if (scsi_pointer->phase & resetted) { done(shpnt, scsi_pointer->Status, DID_RESET); } else if (acp->phase & resetted) { done(shpnt, acp->status, DID_RESET); } else if (scsi_pointer->phase & disconnected) { } else if (acp->phase & disconnected) { /* target sent DISCONNECT */ #if defined(AHA152X_STAT) HOSTDATA(shpnt)->disconnections++; #endif append_SC(&DISCONNECTED_SC, CURRENT_SC); scsi_pointer->phase |= 1 << 16; acp->phase |= 1 << 16; CURRENT_SC = NULL; } else { Loading @@ -1438,24 +1439,23 @@ static void busfree_run(struct Scsi_Host *shpnt) action++; #endif if (aha152x_scsi_pointer(DONE_SC)->phase & check_condition) { if (aha152x_priv(DONE_SC)->phase & check_condition) { struct scsi_cmnd *cmd = HOSTDATA(shpnt)->done_SC; struct aha152x_scdata *sc = SCDATA(cmd); scsi_eh_restore_cmnd(cmd, &sc->ses); aha152x_scsi_pointer(cmd)->Status = SAM_STAT_CHECK_CONDITION; aha152x_priv(cmd)->status = SAM_STAT_CHECK_CONDITION; HOSTDATA(shpnt)->commands--; if (!HOSTDATA(shpnt)->commands) SETPORT(PORTA, 0); /* turn led off */ } else if (aha152x_scsi_pointer(DONE_SC)->Status == SAM_STAT_CHECK_CONDITION) { } else if (aha152x_priv(DONE_SC)->status == SAM_STAT_CHECK_CONDITION) { #if defined(AHA152X_STAT) HOSTDATA(shpnt)->busfree_with_check_condition++; #endif if(!(aha152x_scsi_pointer(DONE_SC)->phase & not_issued)) { if (!(aha152x_priv(DONE_SC)->phase & not_issued)) { struct aha152x_scdata *sc; struct scsi_cmnd *ptr = DONE_SC; DONE_SC=NULL; Loading @@ -1480,7 +1480,7 @@ static void busfree_run(struct Scsi_Host *shpnt) if (!HOSTDATA(shpnt)->commands) SETPORT(PORTA, 0); /* turn led off */ if (!(aha152x_scsi_pointer(ptr)->phase & resetting)) { if (!(aha152x_priv(ptr)->phase & resetting)) { kfree(ptr->host_scribble); ptr->host_scribble=NULL; } Loading @@ -1503,13 +1503,12 @@ static void busfree_run(struct Scsi_Host *shpnt) DO_UNLOCK(flags); if(CURRENT_SC) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); #if defined(AHA152X_STAT) action++; #endif scsi_pointer->phase |= selecting; acp->phase |= selecting; /* clear selection timeout */ SETPORT(SSTAT1, SELTO); Loading Loading @@ -1537,13 +1536,13 @@ static void busfree_run(struct Scsi_Host *shpnt) */ static void seldo_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); SETPORT(SCSISIG, 0); SETPORT(SSTAT1, CLRBUSFREE); SETPORT(SSTAT1, CLRPHASECHG); scsi_pointer->phase &= ~(selecting | not_issued); acp->phase &= ~(selecting | not_issued); SETPORT(SCSISEQ, 0); Loading @@ -1558,12 +1557,12 @@ static void seldo_run(struct Scsi_Host *shpnt) ADDMSGO(IDENTIFY(RECONNECT, CURRENT_SC->device->lun)); if (scsi_pointer->phase & aborting) { if (acp->phase & aborting) { ADDMSGO(ABORT); } else if (scsi_pointer->phase & resetting) { } else if (acp->phase & resetting) { ADDMSGO(BUS_DEVICE_RESET); } else if (SYNCNEG==0 && SYNCHRONOUS) { scsi_pointer->phase |= syncneg; acp->phase |= syncneg; MSGOLEN += spi_populate_sync_msg(&MSGO(MSGOLEN), 50, 8); SYNCNEG=1; /* negotiation in progress */ } Loading @@ -1578,7 +1577,7 @@ static void seldo_run(struct Scsi_Host *shpnt) */ static void selto_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp; SETPORT(SCSISEQ, 0); SETPORT(SSTAT1, CLRSELTIMO); Loading @@ -1586,9 +1585,10 @@ static void selto_run(struct Scsi_Host *shpnt) if (!CURRENT_SC) return; scsi_pointer->phase &= ~selecting; acp = aha152x_priv(CURRENT_SC); acp->phase &= ~selecting; if (scsi_pointer->phase & aborted) if (acp->phase & aborted) done(shpnt, SAM_STAT_GOOD, DID_ABORT); else if (TESTLO(SSTAT0, SELINGO)) done(shpnt, SAM_STAT_GOOD, DID_BUS_BUSY); Loading Loading @@ -1616,10 +1616,9 @@ static void seldi_run(struct Scsi_Host *shpnt) SETPORT(SSTAT1, CLRPHASECHG); if(CURRENT_SC) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); if (!(scsi_pointer->phase & not_issued)) if (!(acp->phase & not_issued)) scmd_printk(KERN_ERR, CURRENT_SC, "command should not have been issued yet\n"); Loading Loading @@ -1676,7 +1675,7 @@ static void seldi_run(struct Scsi_Host *shpnt) static void msgi_run(struct Scsi_Host *shpnt) { for(;;) { struct scsi_pointer *scsi_pointer; struct aha152x_cmd_priv *acp; int sstat1 = GETPORT(SSTAT1); if(sstat1 & (PHASECHG|PHASEMIS|BUSFREE) || !(sstat1 & REQINIT)) Loading Loading @@ -1714,9 +1713,9 @@ static void msgi_run(struct Scsi_Host *shpnt) continue; } scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); scsi_pointer->Message = MSGI(0); scsi_pointer->phase &= ~disconnected; acp = aha152x_priv(CURRENT_SC); acp->message = MSGI(0); acp->phase &= ~disconnected; MSGILEN=0; Loading @@ -1724,8 +1723,8 @@ static void msgi_run(struct Scsi_Host *shpnt) continue; } scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); scsi_pointer->Message = MSGI(0); acp = aha152x_priv(CURRENT_SC); acp->message = MSGI(0); switch (MSGI(0)) { case DISCONNECT: Loading @@ -1733,11 +1732,11 @@ static void msgi_run(struct Scsi_Host *shpnt) scmd_printk(KERN_WARNING, CURRENT_SC, "target was not allowed to disconnect\n"); scsi_pointer->phase |= disconnected; acp->phase |= disconnected; break; case COMMAND_COMPLETE: scsi_pointer->phase |= completed; acp->phase |= completed; break; case MESSAGE_REJECT: Loading Loading @@ -1867,11 +1866,9 @@ static void msgi_end(struct Scsi_Host *shpnt) */ static void msgo_init(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); if(MSGOLEN==0) { if ((scsi_pointer->phase & syncneg) && SYNCNEG==2 && SYNCRATE==0) { if ((aha152x_priv(CURRENT_SC)->phase & syncneg) && SYNCNEG == 2 && SYNCRATE == 0) { ADDMSGO(IDENTIFY(RECONNECT, CURRENT_SC->device->lun)); } else { scmd_printk(KERN_INFO, CURRENT_SC, Loading @@ -1888,7 +1885,7 @@ static void msgo_init(struct Scsi_Host *shpnt) */ static void msgo_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); while(MSGO_I<MSGOLEN) { if (TESTLO(SSTAT0, SPIORDY)) Loading @@ -1901,13 +1898,13 @@ static void msgo_run(struct Scsi_Host *shpnt) if (MSGO(MSGO_I) & IDENTIFY_BASE) scsi_pointer->phase |= identified; acp->phase |= identified; if (MSGO(MSGO_I)==ABORT) scsi_pointer->phase |= aborted; acp->phase |= aborted; if (MSGO(MSGO_I)==BUS_DEVICE_RESET) scsi_pointer->phase |= resetted; acp->phase |= resetted; SETPORT(SCSIDAT, MSGO(MSGO_I++)); } Loading Loading @@ -1936,7 +1933,7 @@ static void msgo_end(struct Scsi_Host *shpnt) */ static void cmd_init(struct Scsi_Host *shpnt) { if (aha152x_scsi_pointer(CURRENT_SC)->sent_command) { if (aha152x_priv(CURRENT_SC)->sent_command) { scmd_printk(KERN_ERR, CURRENT_SC, "command already sent\n"); done(shpnt, SAM_STAT_GOOD, DID_ERROR); Loading Loading @@ -1967,7 +1964,7 @@ static void cmd_end(struct Scsi_Host *shpnt) "command sent incompletely (%d/%d)\n", CMD_I, CURRENT_SC->cmd_len); else aha152x_scsi_pointer(CURRENT_SC)->sent_command++; aha152x_priv(CURRENT_SC)->sent_command++; } /* Loading @@ -1979,7 +1976,7 @@ static void status_run(struct Scsi_Host *shpnt) if (TESTLO(SSTAT0, SPIORDY)) return; aha152x_scsi_pointer(CURRENT_SC)->Status = GETPORT(SCSIDAT); aha152x_priv(CURRENT_SC)->status = GETPORT(SCSIDAT); } Loading @@ -2003,7 +2000,7 @@ static void datai_init(struct Scsi_Host *shpnt) static void datai_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer; struct aha152x_cmd_priv *acp; unsigned long the_time; int fifodata, data_count; Loading Loading @@ -2041,36 +2038,35 @@ static void datai_run(struct Scsi_Host *shpnt) fifodata = GETPORT(FIFOSTAT); } scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); if (scsi_pointer->this_residual > 0) { while (fifodata > 0 && scsi_pointer->this_residual > 0) { data_count = fifodata > scsi_pointer->this_residual ? scsi_pointer->this_residual : fifodata; acp = aha152x_priv(CURRENT_SC); if (acp->this_residual > 0) { while (fifodata > 0 && acp->this_residual > 0) { data_count = fifodata > acp->this_residual ? acp->this_residual : fifodata; fifodata -= data_count; if (data_count & 1) { SETPORT(DMACNTRL0, ENDMA|_8BIT); *scsi_pointer->ptr++ = GETPORT(DATAPORT); scsi_pointer->this_residual--; *acp->ptr++ = GETPORT(DATAPORT); acp->this_residual--; DATA_LEN++; SETPORT(DMACNTRL0, ENDMA); } if (data_count > 1) { data_count >>= 1; insw(DATAPORT, scsi_pointer->ptr, data_count); scsi_pointer->ptr += 2 * data_count; scsi_pointer->this_residual -= 2 * data_count; insw(DATAPORT, acp->ptr, data_count); acp->ptr += 2 * data_count; acp->this_residual -= 2 * data_count; DATA_LEN += 2 * data_count; } if (scsi_pointer->this_residual == 0 && !sg_is_last(scsi_pointer->buffer)) { if (acp->this_residual == 0 && !sg_is_last(acp->buffer)) { /* advance to next buffer */ scsi_pointer->buffer = sg_next(scsi_pointer->buffer); scsi_pointer->ptr = SG_ADDRESS(scsi_pointer->buffer); scsi_pointer->this_residual = scsi_pointer->buffer->length; acp->buffer = sg_next(acp->buffer); acp->ptr = SG_ADDRESS(acp->buffer); acp->this_residual = acp->buffer->length; } } } else if (fifodata > 0) { Loading Loading @@ -2138,15 +2134,15 @@ static void datao_init(struct Scsi_Host *shpnt) static void datao_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); unsigned long the_time; int data_count; /* until phase changes or all data sent */ while (TESTLO(DMASTAT, INTSTAT) && scsi_pointer->this_residual > 0) { while (TESTLO(DMASTAT, INTSTAT) && acp->this_residual > 0) { data_count = 128; if (data_count > scsi_pointer->this_residual) data_count = scsi_pointer->this_residual; if (data_count > acp->this_residual) data_count = acp->this_residual; if(TESTLO(DMASTAT, DFIFOEMP)) { scmd_printk(KERN_ERR, CURRENT_SC, Loading @@ -2157,26 +2153,25 @@ static void datao_run(struct Scsi_Host *shpnt) if(data_count & 1) { SETPORT(DMACNTRL0,WRITE_READ|ENDMA|_8BIT); SETPORT(DATAPORT, *scsi_pointer->ptr++); scsi_pointer->this_residual--; SETPORT(DATAPORT, *acp->ptr++); acp->this_residual--; CMD_INC_RESID(CURRENT_SC, -1); SETPORT(DMACNTRL0,WRITE_READ|ENDMA); } if(data_count > 1) { data_count >>= 1; outsw(DATAPORT, scsi_pointer->ptr, data_count); scsi_pointer->ptr += 2 * data_count; scsi_pointer->this_residual -= 2 * data_count; outsw(DATAPORT, acp->ptr, data_count); acp->ptr += 2 * data_count; acp->this_residual -= 2 * data_count; CMD_INC_RESID(CURRENT_SC, -2 * data_count); } if (scsi_pointer->this_residual == 0 && !sg_is_last(scsi_pointer->buffer)) { if (acp->this_residual == 0 && !sg_is_last(acp->buffer)) { /* advance to next buffer */ scsi_pointer->buffer = sg_next(scsi_pointer->buffer); scsi_pointer->ptr = SG_ADDRESS(scsi_pointer->buffer); scsi_pointer->this_residual = scsi_pointer->buffer->length; acp->buffer = sg_next(acp->buffer); acp->ptr = SG_ADDRESS(acp->buffer); acp->this_residual = acp->buffer->length; } the_time=jiffies + 100*HZ; Loading @@ -2192,7 +2187,7 @@ static void datao_run(struct Scsi_Host *shpnt) static void datao_end(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); if(TESTLO(DMASTAT, DFIFOEMP)) { u32 datao_cnt = GETSTCNT(); Loading @@ -2211,10 +2206,9 @@ static void datao_end(struct Scsi_Host *shpnt) sg = sg_next(sg); } scsi_pointer->buffer = sg; scsi_pointer->ptr = SG_ADDRESS(scsi_pointer->buffer) + done; scsi_pointer->this_residual = scsi_pointer->buffer->length - done; acp->buffer = sg; acp->ptr = SG_ADDRESS(acp->buffer) + done; acp->this_residual = acp->buffer->length - done; } SETPORT(SXFRCTL0, CH1|CLRCH1|CLRSTCNT); Loading @@ -2229,7 +2223,6 @@ static void datao_end(struct Scsi_Host *shpnt) */ static int update_state(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); int dataphase=0; unsigned int stat0 = GETPORT(SSTAT0); unsigned int stat1 = GETPORT(SSTAT1); Loading @@ -2244,7 +2237,7 @@ static int update_state(struct Scsi_Host *shpnt) } else if (stat0 & SELDI && PREVSTATE == busfree) { STATE=seldi; } else if (stat0 & SELDO && CURRENT_SC && (scsi_pointer->phase & selecting)) { (aha152x_priv(CURRENT_SC)->phase & selecting)) { STATE=seldo; } else if(stat1 & SELTO) { STATE=selto; Loading Loading @@ -2376,8 +2369,7 @@ static void is_complete(struct Scsi_Host *shpnt) SETPORT(SXFRCTL0, CH1); SETPORT(DMACNTRL0, 0); if(CURRENT_SC) aha152x_scsi_pointer(CURRENT_SC)->phase &= ~spiordy; aha152x_priv(CURRENT_SC)->phase &= ~spiordy; } /* Loading @@ -2399,8 +2391,7 @@ static void is_complete(struct Scsi_Host *shpnt) SETPORT(DMACNTRL0, 0); SETPORT(SXFRCTL0, CH1|SPIOEN); if(CURRENT_SC) aha152x_scsi_pointer(CURRENT_SC)->phase |= spiordy; aha152x_priv(CURRENT_SC)->phase |= spiordy; } /* Loading Loading @@ -2490,7 +2481,7 @@ static void disp_enintr(struct Scsi_Host *shpnt) */ static void show_command(struct scsi_cmnd *ptr) { const int phase = aha152x_scsi_pointer(ptr)->phase; const int phase = aha152x_priv(ptr)->phase; scsi_print_command(ptr); scmd_printk(KERN_DEBUG, ptr, Loading Loading @@ -2538,8 +2529,8 @@ static void show_queues(struct Scsi_Host *shpnt) static void get_command(struct seq_file *m, struct scsi_cmnd * ptr) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(ptr); const int phase = scsi_pointer->phase; struct aha152x_cmd_priv *acp = aha152x_priv(ptr); const int phase = acp->phase; int i; seq_printf(m, "%p: target=%d; lun=%d; cmnd=( ", Loading @@ -2549,8 +2540,8 @@ static void get_command(struct seq_file *m, struct scsi_cmnd * ptr) seq_printf(m, "0x%02x ", ptr->cmnd[i]); seq_printf(m, "); resid=%d; residual=%d; buffers=%d; phase |", scsi_get_resid(ptr), scsi_pointer->this_residual, sg_nents(scsi_pointer->buffer) - 1); scsi_get_resid(ptr), acp->this_residual, sg_nents(acp->buffer) - 1); if (phase & not_issued) seq_puts(m, "not issued|"); Loading drivers/scsi/aic7xxx/aic79xx_osm.h +0 −2 Original line number Diff line number Diff line Loading @@ -420,8 +420,6 @@ ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) /* config registers for header type 0 devices */ #define PCIR_MAPS 0x10 #define PCIR_SUBVEND_0 0x2c #define PCIR_SUBDEV_0 0x2e /****************************** PCI-X definitions *****************************/ #define PCIXR_COMMAND 0x96 Loading drivers/scsi/aic7xxx/aic79xx_pci.c +3 −3 Original line number Diff line number Diff line Loading @@ -260,8 +260,8 @@ ahd_find_pci_device(ahd_dev_softc_t pci) vendor = ahd_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); device = ahd_pci_read_config(pci, PCIR_DEVICE, /*bytes*/2); subvendor = ahd_pci_read_config(pci, PCIR_SUBVEND_0, /*bytes*/2); subdevice = ahd_pci_read_config(pci, PCIR_SUBDEV_0, /*bytes*/2); subvendor = ahd_pci_read_config(pci, PCI_SUBSYSTEM_VENDOR_ID, /*bytes*/2); subdevice = ahd_pci_read_config(pci, PCI_SUBSYSTEM_ID, /*bytes*/2); full_id = ahd_compose_id(device, vendor, subdevice, Loading Loading @@ -298,7 +298,7 @@ ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry) * Record if this is an HP board. */ subvendor = ahd_pci_read_config(ahd->dev_softc, PCIR_SUBVEND_0, /*bytes*/2); PCI_SUBSYSTEM_VENDOR_ID, /*bytes*/2); if (subvendor == SUBID_HP) ahd->flags |= AHD_HP_BOARD; Loading Loading
MAINTAINERS +1 −0 Original line number Diff line number Diff line Loading @@ -10369,6 +10369,7 @@ F: include/linux/isapnp.h ISCSI M: Lee Duncan <lduncan@suse.com> M: Chris Leech <cleech@redhat.com> M: Mike Christie <michael.christie@oracle.com> L: open-iscsi@googlegroups.com L: linux-scsi@vger.kernel.org S: Maintained Loading
drivers/message/fusion/mptbase.c +2 −2 Original line number Diff line number Diff line Loading @@ -6658,13 +6658,13 @@ static int mpt_summary_proc_show(struct seq_file *m, void *v) static int mpt_version_proc_show(struct seq_file *m, void *v) { u8 cb_idx; int scsi, fc, sas, lan, ctl, targ, dmp; int scsi, fc, sas, lan, ctl, targ; char *drvname; seq_printf(m, "%s-%s\n", "mptlinux", MPT_LINUX_VERSION_COMMON); seq_printf(m, " Fusion MPT base driver\n"); scsi = fc = sas = lan = ctl = targ = dmp = 0; scsi = fc = sas = lan = ctl = targ = 0; for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { drvname = NULL; if (MptCallbacks[cb_idx]) { Loading
drivers/scsi/aha152x.c +113 −122 Original line number Diff line number Diff line Loading @@ -317,14 +317,18 @@ enum { }; struct aha152x_cmd_priv { struct scsi_pointer scsi_pointer; char *ptr; int this_residual; struct scatterlist *buffer; int status; int message; int sent_command; int phase; }; static struct scsi_pointer *aha152x_scsi_pointer(struct scsi_cmnd *cmd) static struct aha152x_cmd_priv *aha152x_priv(struct scsi_cmnd *cmd) { struct aha152x_cmd_priv *acmd = scsi_cmd_priv(cmd); return &acmd->scsi_pointer; return scsi_cmd_priv(cmd); } MODULE_AUTHOR("Jürgen Fischer"); Loading Loading @@ -890,17 +894,16 @@ void aha152x_release(struct Scsi_Host *shpnt) static int setup_expected_interrupts(struct Scsi_Host *shpnt) { if(CURRENT_SC) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); scsi_pointer->phase |= 1 << 16; acp->phase |= 1 << 16; if (scsi_pointer->phase & selecting) { if (acp->phase & selecting) { SETPORT(SSTAT1, SELTO); SETPORT(SIMODE0, ENSELDO | (DISCONNECTED_SC ? ENSELDI : 0)); SETPORT(SIMODE1, ENSELTIMO); } else { SETPORT(SIMODE0, (scsi_pointer->phase & spiordy) ? ENSPIORDY : 0); SETPORT(SIMODE0, (acp->phase & spiordy) ? ENSPIORDY : 0); SETPORT(SIMODE1, ENPHASEMIS | ENSCSIRST | ENSCSIPERR | ENBUSFREE); } } else if(STATE==seldi) { Loading @@ -924,17 +927,16 @@ static int setup_expected_interrupts(struct Scsi_Host *shpnt) static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, struct completion *complete, int phase) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(SCpnt); struct aha152x_cmd_priv *acp = aha152x_priv(SCpnt); struct Scsi_Host *shpnt = SCpnt->device->host; unsigned long flags; scsi_pointer->phase = not_issued | phase; scsi_pointer->Status = 0x1; /* Ilegal status by SCSI standard */ scsi_pointer->Message = 0; scsi_pointer->have_data_in = 0; scsi_pointer->sent_command = 0; acp->phase = not_issued | phase; acp->status = 0x1; /* Illegal status by SCSI standard */ acp->message = 0; acp->sent_command = 0; if (scsi_pointer->phase & (resetting | check_condition)) { if (acp->phase & (resetting | check_condition)) { if (!SCpnt->host_scribble || SCSEM(SCpnt) || SCNEXT(SCpnt)) { scmd_printk(KERN_ERR, SCpnt, "cannot reuse command\n"); return FAILED; Loading @@ -957,15 +959,15 @@ static int aha152x_internal_queue(struct scsi_cmnd *SCpnt, SCp.phase : current state of the command */ if ((phase & resetting) || !scsi_sglist(SCpnt)) { scsi_pointer->ptr = NULL; scsi_pointer->this_residual = 0; acp->ptr = NULL; acp->this_residual = 0; scsi_set_resid(SCpnt, 0); scsi_pointer->buffer = NULL; acp->buffer = NULL; } else { scsi_set_resid(SCpnt, scsi_bufflen(SCpnt)); scsi_pointer->buffer = scsi_sglist(SCpnt); scsi_pointer->ptr = SG_ADDRESS(scsi_pointer->buffer); scsi_pointer->this_residual = scsi_pointer->buffer->length; acp->buffer = scsi_sglist(SCpnt); acp->ptr = SG_ADDRESS(acp->buffer); acp->this_residual = acp->buffer->length; } DO_LOCK(flags); Loading Loading @@ -1015,7 +1017,7 @@ static void reset_done(struct scsi_cmnd *SCpnt) static void aha152x_scsi_done(struct scsi_cmnd *SCpnt) { if (aha152x_scsi_pointer(SCpnt)->phase & resetting) if (aha152x_priv(SCpnt)->phase & resetting) reset_done(SCpnt); else scsi_done(SCpnt); Loading Loading @@ -1101,7 +1103,7 @@ static int aha152x_device_reset(struct scsi_cmnd * SCpnt) DO_LOCK(flags); if (aha152x_scsi_pointer(SCpnt)->phase & resetted) { if (aha152x_priv(SCpnt)->phase & resetted) { HOSTDATA(shpnt)->commands--; if (!HOSTDATA(shpnt)->commands) SETPORT(PORTA, 0); Loading Loading @@ -1395,31 +1397,30 @@ static void busfree_run(struct Scsi_Host *shpnt) SETPORT(SSTAT1, CLRBUSFREE); if(CURRENT_SC) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); #if defined(AHA152X_STAT) action++; #endif scsi_pointer->phase &= ~syncneg; acp->phase &= ~syncneg; if (scsi_pointer->phase & completed) { if (acp->phase & completed) { /* target sent COMMAND COMPLETE */ done(shpnt, scsi_pointer->Status, DID_OK); done(shpnt, acp->status, DID_OK); } else if (scsi_pointer->phase & aborted) { done(shpnt, scsi_pointer->Status, DID_ABORT); } else if (acp->phase & aborted) { done(shpnt, acp->status, DID_ABORT); } else if (scsi_pointer->phase & resetted) { done(shpnt, scsi_pointer->Status, DID_RESET); } else if (acp->phase & resetted) { done(shpnt, acp->status, DID_RESET); } else if (scsi_pointer->phase & disconnected) { } else if (acp->phase & disconnected) { /* target sent DISCONNECT */ #if defined(AHA152X_STAT) HOSTDATA(shpnt)->disconnections++; #endif append_SC(&DISCONNECTED_SC, CURRENT_SC); scsi_pointer->phase |= 1 << 16; acp->phase |= 1 << 16; CURRENT_SC = NULL; } else { Loading @@ -1438,24 +1439,23 @@ static void busfree_run(struct Scsi_Host *shpnt) action++; #endif if (aha152x_scsi_pointer(DONE_SC)->phase & check_condition) { if (aha152x_priv(DONE_SC)->phase & check_condition) { struct scsi_cmnd *cmd = HOSTDATA(shpnt)->done_SC; struct aha152x_scdata *sc = SCDATA(cmd); scsi_eh_restore_cmnd(cmd, &sc->ses); aha152x_scsi_pointer(cmd)->Status = SAM_STAT_CHECK_CONDITION; aha152x_priv(cmd)->status = SAM_STAT_CHECK_CONDITION; HOSTDATA(shpnt)->commands--; if (!HOSTDATA(shpnt)->commands) SETPORT(PORTA, 0); /* turn led off */ } else if (aha152x_scsi_pointer(DONE_SC)->Status == SAM_STAT_CHECK_CONDITION) { } else if (aha152x_priv(DONE_SC)->status == SAM_STAT_CHECK_CONDITION) { #if defined(AHA152X_STAT) HOSTDATA(shpnt)->busfree_with_check_condition++; #endif if(!(aha152x_scsi_pointer(DONE_SC)->phase & not_issued)) { if (!(aha152x_priv(DONE_SC)->phase & not_issued)) { struct aha152x_scdata *sc; struct scsi_cmnd *ptr = DONE_SC; DONE_SC=NULL; Loading @@ -1480,7 +1480,7 @@ static void busfree_run(struct Scsi_Host *shpnt) if (!HOSTDATA(shpnt)->commands) SETPORT(PORTA, 0); /* turn led off */ if (!(aha152x_scsi_pointer(ptr)->phase & resetting)) { if (!(aha152x_priv(ptr)->phase & resetting)) { kfree(ptr->host_scribble); ptr->host_scribble=NULL; } Loading @@ -1503,13 +1503,12 @@ static void busfree_run(struct Scsi_Host *shpnt) DO_UNLOCK(flags); if(CURRENT_SC) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); #if defined(AHA152X_STAT) action++; #endif scsi_pointer->phase |= selecting; acp->phase |= selecting; /* clear selection timeout */ SETPORT(SSTAT1, SELTO); Loading Loading @@ -1537,13 +1536,13 @@ static void busfree_run(struct Scsi_Host *shpnt) */ static void seldo_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); SETPORT(SCSISIG, 0); SETPORT(SSTAT1, CLRBUSFREE); SETPORT(SSTAT1, CLRPHASECHG); scsi_pointer->phase &= ~(selecting | not_issued); acp->phase &= ~(selecting | not_issued); SETPORT(SCSISEQ, 0); Loading @@ -1558,12 +1557,12 @@ static void seldo_run(struct Scsi_Host *shpnt) ADDMSGO(IDENTIFY(RECONNECT, CURRENT_SC->device->lun)); if (scsi_pointer->phase & aborting) { if (acp->phase & aborting) { ADDMSGO(ABORT); } else if (scsi_pointer->phase & resetting) { } else if (acp->phase & resetting) { ADDMSGO(BUS_DEVICE_RESET); } else if (SYNCNEG==0 && SYNCHRONOUS) { scsi_pointer->phase |= syncneg; acp->phase |= syncneg; MSGOLEN += spi_populate_sync_msg(&MSGO(MSGOLEN), 50, 8); SYNCNEG=1; /* negotiation in progress */ } Loading @@ -1578,7 +1577,7 @@ static void seldo_run(struct Scsi_Host *shpnt) */ static void selto_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp; SETPORT(SCSISEQ, 0); SETPORT(SSTAT1, CLRSELTIMO); Loading @@ -1586,9 +1585,10 @@ static void selto_run(struct Scsi_Host *shpnt) if (!CURRENT_SC) return; scsi_pointer->phase &= ~selecting; acp = aha152x_priv(CURRENT_SC); acp->phase &= ~selecting; if (scsi_pointer->phase & aborted) if (acp->phase & aborted) done(shpnt, SAM_STAT_GOOD, DID_ABORT); else if (TESTLO(SSTAT0, SELINGO)) done(shpnt, SAM_STAT_GOOD, DID_BUS_BUSY); Loading Loading @@ -1616,10 +1616,9 @@ static void seldi_run(struct Scsi_Host *shpnt) SETPORT(SSTAT1, CLRPHASECHG); if(CURRENT_SC) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); if (!(scsi_pointer->phase & not_issued)) if (!(acp->phase & not_issued)) scmd_printk(KERN_ERR, CURRENT_SC, "command should not have been issued yet\n"); Loading Loading @@ -1676,7 +1675,7 @@ static void seldi_run(struct Scsi_Host *shpnt) static void msgi_run(struct Scsi_Host *shpnt) { for(;;) { struct scsi_pointer *scsi_pointer; struct aha152x_cmd_priv *acp; int sstat1 = GETPORT(SSTAT1); if(sstat1 & (PHASECHG|PHASEMIS|BUSFREE) || !(sstat1 & REQINIT)) Loading Loading @@ -1714,9 +1713,9 @@ static void msgi_run(struct Scsi_Host *shpnt) continue; } scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); scsi_pointer->Message = MSGI(0); scsi_pointer->phase &= ~disconnected; acp = aha152x_priv(CURRENT_SC); acp->message = MSGI(0); acp->phase &= ~disconnected; MSGILEN=0; Loading @@ -1724,8 +1723,8 @@ static void msgi_run(struct Scsi_Host *shpnt) continue; } scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); scsi_pointer->Message = MSGI(0); acp = aha152x_priv(CURRENT_SC); acp->message = MSGI(0); switch (MSGI(0)) { case DISCONNECT: Loading @@ -1733,11 +1732,11 @@ static void msgi_run(struct Scsi_Host *shpnt) scmd_printk(KERN_WARNING, CURRENT_SC, "target was not allowed to disconnect\n"); scsi_pointer->phase |= disconnected; acp->phase |= disconnected; break; case COMMAND_COMPLETE: scsi_pointer->phase |= completed; acp->phase |= completed; break; case MESSAGE_REJECT: Loading Loading @@ -1867,11 +1866,9 @@ static void msgi_end(struct Scsi_Host *shpnt) */ static void msgo_init(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); if(MSGOLEN==0) { if ((scsi_pointer->phase & syncneg) && SYNCNEG==2 && SYNCRATE==0) { if ((aha152x_priv(CURRENT_SC)->phase & syncneg) && SYNCNEG == 2 && SYNCRATE == 0) { ADDMSGO(IDENTIFY(RECONNECT, CURRENT_SC->device->lun)); } else { scmd_printk(KERN_INFO, CURRENT_SC, Loading @@ -1888,7 +1885,7 @@ static void msgo_init(struct Scsi_Host *shpnt) */ static void msgo_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); while(MSGO_I<MSGOLEN) { if (TESTLO(SSTAT0, SPIORDY)) Loading @@ -1901,13 +1898,13 @@ static void msgo_run(struct Scsi_Host *shpnt) if (MSGO(MSGO_I) & IDENTIFY_BASE) scsi_pointer->phase |= identified; acp->phase |= identified; if (MSGO(MSGO_I)==ABORT) scsi_pointer->phase |= aborted; acp->phase |= aborted; if (MSGO(MSGO_I)==BUS_DEVICE_RESET) scsi_pointer->phase |= resetted; acp->phase |= resetted; SETPORT(SCSIDAT, MSGO(MSGO_I++)); } Loading Loading @@ -1936,7 +1933,7 @@ static void msgo_end(struct Scsi_Host *shpnt) */ static void cmd_init(struct Scsi_Host *shpnt) { if (aha152x_scsi_pointer(CURRENT_SC)->sent_command) { if (aha152x_priv(CURRENT_SC)->sent_command) { scmd_printk(KERN_ERR, CURRENT_SC, "command already sent\n"); done(shpnt, SAM_STAT_GOOD, DID_ERROR); Loading Loading @@ -1967,7 +1964,7 @@ static void cmd_end(struct Scsi_Host *shpnt) "command sent incompletely (%d/%d)\n", CMD_I, CURRENT_SC->cmd_len); else aha152x_scsi_pointer(CURRENT_SC)->sent_command++; aha152x_priv(CURRENT_SC)->sent_command++; } /* Loading @@ -1979,7 +1976,7 @@ static void status_run(struct Scsi_Host *shpnt) if (TESTLO(SSTAT0, SPIORDY)) return; aha152x_scsi_pointer(CURRENT_SC)->Status = GETPORT(SCSIDAT); aha152x_priv(CURRENT_SC)->status = GETPORT(SCSIDAT); } Loading @@ -2003,7 +2000,7 @@ static void datai_init(struct Scsi_Host *shpnt) static void datai_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer; struct aha152x_cmd_priv *acp; unsigned long the_time; int fifodata, data_count; Loading Loading @@ -2041,36 +2038,35 @@ static void datai_run(struct Scsi_Host *shpnt) fifodata = GETPORT(FIFOSTAT); } scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); if (scsi_pointer->this_residual > 0) { while (fifodata > 0 && scsi_pointer->this_residual > 0) { data_count = fifodata > scsi_pointer->this_residual ? scsi_pointer->this_residual : fifodata; acp = aha152x_priv(CURRENT_SC); if (acp->this_residual > 0) { while (fifodata > 0 && acp->this_residual > 0) { data_count = fifodata > acp->this_residual ? acp->this_residual : fifodata; fifodata -= data_count; if (data_count & 1) { SETPORT(DMACNTRL0, ENDMA|_8BIT); *scsi_pointer->ptr++ = GETPORT(DATAPORT); scsi_pointer->this_residual--; *acp->ptr++ = GETPORT(DATAPORT); acp->this_residual--; DATA_LEN++; SETPORT(DMACNTRL0, ENDMA); } if (data_count > 1) { data_count >>= 1; insw(DATAPORT, scsi_pointer->ptr, data_count); scsi_pointer->ptr += 2 * data_count; scsi_pointer->this_residual -= 2 * data_count; insw(DATAPORT, acp->ptr, data_count); acp->ptr += 2 * data_count; acp->this_residual -= 2 * data_count; DATA_LEN += 2 * data_count; } if (scsi_pointer->this_residual == 0 && !sg_is_last(scsi_pointer->buffer)) { if (acp->this_residual == 0 && !sg_is_last(acp->buffer)) { /* advance to next buffer */ scsi_pointer->buffer = sg_next(scsi_pointer->buffer); scsi_pointer->ptr = SG_ADDRESS(scsi_pointer->buffer); scsi_pointer->this_residual = scsi_pointer->buffer->length; acp->buffer = sg_next(acp->buffer); acp->ptr = SG_ADDRESS(acp->buffer); acp->this_residual = acp->buffer->length; } } } else if (fifodata > 0) { Loading Loading @@ -2138,15 +2134,15 @@ static void datao_init(struct Scsi_Host *shpnt) static void datao_run(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); unsigned long the_time; int data_count; /* until phase changes or all data sent */ while (TESTLO(DMASTAT, INTSTAT) && scsi_pointer->this_residual > 0) { while (TESTLO(DMASTAT, INTSTAT) && acp->this_residual > 0) { data_count = 128; if (data_count > scsi_pointer->this_residual) data_count = scsi_pointer->this_residual; if (data_count > acp->this_residual) data_count = acp->this_residual; if(TESTLO(DMASTAT, DFIFOEMP)) { scmd_printk(KERN_ERR, CURRENT_SC, Loading @@ -2157,26 +2153,25 @@ static void datao_run(struct Scsi_Host *shpnt) if(data_count & 1) { SETPORT(DMACNTRL0,WRITE_READ|ENDMA|_8BIT); SETPORT(DATAPORT, *scsi_pointer->ptr++); scsi_pointer->this_residual--; SETPORT(DATAPORT, *acp->ptr++); acp->this_residual--; CMD_INC_RESID(CURRENT_SC, -1); SETPORT(DMACNTRL0,WRITE_READ|ENDMA); } if(data_count > 1) { data_count >>= 1; outsw(DATAPORT, scsi_pointer->ptr, data_count); scsi_pointer->ptr += 2 * data_count; scsi_pointer->this_residual -= 2 * data_count; outsw(DATAPORT, acp->ptr, data_count); acp->ptr += 2 * data_count; acp->this_residual -= 2 * data_count; CMD_INC_RESID(CURRENT_SC, -2 * data_count); } if (scsi_pointer->this_residual == 0 && !sg_is_last(scsi_pointer->buffer)) { if (acp->this_residual == 0 && !sg_is_last(acp->buffer)) { /* advance to next buffer */ scsi_pointer->buffer = sg_next(scsi_pointer->buffer); scsi_pointer->ptr = SG_ADDRESS(scsi_pointer->buffer); scsi_pointer->this_residual = scsi_pointer->buffer->length; acp->buffer = sg_next(acp->buffer); acp->ptr = SG_ADDRESS(acp->buffer); acp->this_residual = acp->buffer->length; } the_time=jiffies + 100*HZ; Loading @@ -2192,7 +2187,7 @@ static void datao_run(struct Scsi_Host *shpnt) static void datao_end(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); struct aha152x_cmd_priv *acp = aha152x_priv(CURRENT_SC); if(TESTLO(DMASTAT, DFIFOEMP)) { u32 datao_cnt = GETSTCNT(); Loading @@ -2211,10 +2206,9 @@ static void datao_end(struct Scsi_Host *shpnt) sg = sg_next(sg); } scsi_pointer->buffer = sg; scsi_pointer->ptr = SG_ADDRESS(scsi_pointer->buffer) + done; scsi_pointer->this_residual = scsi_pointer->buffer->length - done; acp->buffer = sg; acp->ptr = SG_ADDRESS(acp->buffer) + done; acp->this_residual = acp->buffer->length - done; } SETPORT(SXFRCTL0, CH1|CLRCH1|CLRSTCNT); Loading @@ -2229,7 +2223,6 @@ static void datao_end(struct Scsi_Host *shpnt) */ static int update_state(struct Scsi_Host *shpnt) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(CURRENT_SC); int dataphase=0; unsigned int stat0 = GETPORT(SSTAT0); unsigned int stat1 = GETPORT(SSTAT1); Loading @@ -2244,7 +2237,7 @@ static int update_state(struct Scsi_Host *shpnt) } else if (stat0 & SELDI && PREVSTATE == busfree) { STATE=seldi; } else if (stat0 & SELDO && CURRENT_SC && (scsi_pointer->phase & selecting)) { (aha152x_priv(CURRENT_SC)->phase & selecting)) { STATE=seldo; } else if(stat1 & SELTO) { STATE=selto; Loading Loading @@ -2376,8 +2369,7 @@ static void is_complete(struct Scsi_Host *shpnt) SETPORT(SXFRCTL0, CH1); SETPORT(DMACNTRL0, 0); if(CURRENT_SC) aha152x_scsi_pointer(CURRENT_SC)->phase &= ~spiordy; aha152x_priv(CURRENT_SC)->phase &= ~spiordy; } /* Loading @@ -2399,8 +2391,7 @@ static void is_complete(struct Scsi_Host *shpnt) SETPORT(DMACNTRL0, 0); SETPORT(SXFRCTL0, CH1|SPIOEN); if(CURRENT_SC) aha152x_scsi_pointer(CURRENT_SC)->phase |= spiordy; aha152x_priv(CURRENT_SC)->phase |= spiordy; } /* Loading Loading @@ -2490,7 +2481,7 @@ static void disp_enintr(struct Scsi_Host *shpnt) */ static void show_command(struct scsi_cmnd *ptr) { const int phase = aha152x_scsi_pointer(ptr)->phase; const int phase = aha152x_priv(ptr)->phase; scsi_print_command(ptr); scmd_printk(KERN_DEBUG, ptr, Loading Loading @@ -2538,8 +2529,8 @@ static void show_queues(struct Scsi_Host *shpnt) static void get_command(struct seq_file *m, struct scsi_cmnd * ptr) { struct scsi_pointer *scsi_pointer = aha152x_scsi_pointer(ptr); const int phase = scsi_pointer->phase; struct aha152x_cmd_priv *acp = aha152x_priv(ptr); const int phase = acp->phase; int i; seq_printf(m, "%p: target=%d; lun=%d; cmnd=( ", Loading @@ -2549,8 +2540,8 @@ static void get_command(struct seq_file *m, struct scsi_cmnd * ptr) seq_printf(m, "0x%02x ", ptr->cmnd[i]); seq_printf(m, "); resid=%d; residual=%d; buffers=%d; phase |", scsi_get_resid(ptr), scsi_pointer->this_residual, sg_nents(scsi_pointer->buffer) - 1); scsi_get_resid(ptr), acp->this_residual, sg_nents(acp->buffer) - 1); if (phase & not_issued) seq_puts(m, "not issued|"); Loading
drivers/scsi/aic7xxx/aic79xx_osm.h +0 −2 Original line number Diff line number Diff line Loading @@ -420,8 +420,6 @@ ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) /* config registers for header type 0 devices */ #define PCIR_MAPS 0x10 #define PCIR_SUBVEND_0 0x2c #define PCIR_SUBDEV_0 0x2e /****************************** PCI-X definitions *****************************/ #define PCIXR_COMMAND 0x96 Loading
drivers/scsi/aic7xxx/aic79xx_pci.c +3 −3 Original line number Diff line number Diff line Loading @@ -260,8 +260,8 @@ ahd_find_pci_device(ahd_dev_softc_t pci) vendor = ahd_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); device = ahd_pci_read_config(pci, PCIR_DEVICE, /*bytes*/2); subvendor = ahd_pci_read_config(pci, PCIR_SUBVEND_0, /*bytes*/2); subdevice = ahd_pci_read_config(pci, PCIR_SUBDEV_0, /*bytes*/2); subvendor = ahd_pci_read_config(pci, PCI_SUBSYSTEM_VENDOR_ID, /*bytes*/2); subdevice = ahd_pci_read_config(pci, PCI_SUBSYSTEM_ID, /*bytes*/2); full_id = ahd_compose_id(device, vendor, subdevice, Loading Loading @@ -298,7 +298,7 @@ ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry) * Record if this is an HP board. */ subvendor = ahd_pci_read_config(ahd->dev_softc, PCIR_SUBVEND_0, /*bytes*/2); PCI_SUBSYSTEM_VENDOR_ID, /*bytes*/2); if (subvendor == SUBID_HP) ahd->flags |= AHD_HP_BOARD; Loading