Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (38 commits)
  [SCSI] More buffer->request_buffer changes
  [SCSI] mptfusion: bump version to 3.04.01
  [SCSI] mptfusion: misc fix's
  [SCSI] mptfusion: firmware download boot fix's
  [SCSI] mptfusion: task abort fix's
  [SCSI] mptfusion: sas nexus loss support
  [SCSI] mptfusion: sas loginfo update
  [SCSI] mptfusion: mptctl panic when loading
  [SCSI] mptfusion: sas enclosures with smart drive
  [SCSI] NCR_D700: misc fixes (section and argument ordering)
  [SCSI] scsi_debug: must_check fixes
  [SCSI] scsi_transport_sas: kill the use of channel 
  [SCSI] scsi_transport_sas: add expander backlink
  [SCSI] hide EH backup data outside the scsi_cmnd
  [SCSI] ibmvscsi: handle inactive SCSI target during probe
  [SCSI] ibmvscsi: allocate lpevents for ibmvscsi on iseries
  [SCSI] aic7[9x]xx: Remove last vestiges of reverse_scan
  [SCSI] aha152x: stop poking at saved scsi_cmnd members
  [SCSI] st.c: Improve sense output
  [SCSI] lpfc 8.1.7: Change version number to 8.1.7
  ...
This commit is contained in:
Linus Torvalds
2006-07-21 12:04:53 -07:00
55 changed files with 805 additions and 681 deletions
+2 -2
View File
@@ -429,7 +429,7 @@ static inline void fcp_scsi_receive(fc_channel *fc, int token, int status, fc_hd
if (fcmd->data) { if (fcmd->data) {
if (SCpnt->use_sg) if (SCpnt->use_sg)
dma_unmap_sg(fc->dev, (struct scatterlist *)SCpnt->buffer, dma_unmap_sg(fc->dev, (struct scatterlist *)SCpnt->request_buffer,
SCpnt->use_sg, SCpnt->use_sg,
SCpnt->sc_data_direction); SCpnt->sc_data_direction);
else else
@@ -810,7 +810,7 @@ static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, i
SCpnt->request_bufflen, SCpnt->request_bufflen,
SCpnt->sc_data_direction); SCpnt->sc_data_direction);
} else { } else {
struct scatterlist *sg = (struct scatterlist *)SCpnt->buffer; struct scatterlist *sg = (struct scatterlist *)SCpnt->request_buffer;
int nents; int nents;
FCD(("XXX: Use_sg %d %d\n", SCpnt->use_sg, sg->length)) FCD(("XXX: Use_sg %d %d\n", SCpnt->use_sg, sg->length))
-2
View File
@@ -48,10 +48,8 @@ config FUSION_SAS
List of supported controllers: List of supported controllers:
LSISAS1064 LSISAS1064
LSISAS1066
LSISAS1068 LSISAS1068
LSISAS1064E LSISAS1064E
LSISAS1066E
LSISAS1068E LSISAS1068E
config FUSION_MAX_SGE config FUSION_MAX_SGE
-1
View File
@@ -9,7 +9,6 @@
#EXTRA_CFLAGS += -DMPT_DEBUG_EXIT #EXTRA_CFLAGS += -DMPT_DEBUG_EXIT
#EXTRA_CFLAGS += -DMPT_DEBUG_FAIL #EXTRA_CFLAGS += -DMPT_DEBUG_FAIL
# #
# driver/module specifics... # driver/module specifics...
# #
+64 -35
View File
@@ -436,8 +436,6 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply)
*/ */
if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) { if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) {
freereq = 0; freereq = 0;
devtverboseprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p does not return Request frame\n",
ioc->name, pEvReply));
} else { } else {
devtverboseprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns Request frame\n", devtverboseprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns Request frame\n",
ioc->name, pEvReply)); ioc->name, pEvReply));
@@ -678,19 +676,19 @@ int
mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, int cb_idx) mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, int cb_idx)
{ {
MPT_ADAPTER *ioc; MPT_ADAPTER *ioc;
const struct pci_device_id *id;
if (cb_idx < 1 || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) { if (cb_idx < 1 || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS)
return -EINVAL; return -EINVAL;
}
MptDeviceDriverHandlers[cb_idx] = dd_cbfunc; MptDeviceDriverHandlers[cb_idx] = dd_cbfunc;
/* call per pci device probe entry point */ /* call per pci device probe entry point */
list_for_each_entry(ioc, &ioc_list, list) { list_for_each_entry(ioc, &ioc_list, list) {
if(dd_cbfunc->probe) { id = ioc->pcidev->driver ?
dd_cbfunc->probe(ioc->pcidev, ioc->pcidev->driver->id_table : NULL;
ioc->pcidev->driver->id_table); if (dd_cbfunc->probe)
} dd_cbfunc->probe(ioc->pcidev, id);
} }
return 0; return 0;
@@ -1056,9 +1054,8 @@ mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init)
dinitprintk((MYIOC_s_INFO_FMT dinitprintk((MYIOC_s_INFO_FMT
"host_page_buffer @ %p, dma @ %x, sz=%d bytes\n", "host_page_buffer @ %p, dma @ %x, sz=%d bytes\n",
ioc->name, ioc->name, ioc->HostPageBuffer,
ioc->HostPageBuffer, (u32)ioc->HostPageBuffer_dma,
ioc->HostPageBuffer_dma,
host_page_buffer_sz)); host_page_buffer_sz));
ioc->alloc_total += host_page_buffer_sz; ioc->alloc_total += host_page_buffer_sz;
ioc->HostPageBuffer_sz = host_page_buffer_sz; ioc->HostPageBuffer_sz = host_page_buffer_sz;
@@ -1380,6 +1377,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
printk(KERN_WARNING MYNAM printk(KERN_WARNING MYNAM
": WARNING - %s did not initialize properly! (%d)\n", ": WARNING - %s did not initialize properly! (%d)\n",
ioc->name, r); ioc->name, r);
list_del(&ioc->list); list_del(&ioc->list);
if (ioc->alt_ioc) if (ioc->alt_ioc)
ioc->alt_ioc->alt_ioc = NULL; ioc->alt_ioc->alt_ioc = NULL;
@@ -1762,9 +1760,9 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
* chips (mpt_adapter_disable, * chips (mpt_adapter_disable,
* mpt_diag_reset) * mpt_diag_reset)
*/ */
ioc->cached_fw = NULL;
ddlprintk((MYIOC_s_INFO_FMT ": mpt_upload: alt_%s has cached_fw=%p \n", ddlprintk((MYIOC_s_INFO_FMT ": mpt_upload: alt_%s has cached_fw=%p \n",
ioc->name, ioc->alt_ioc->name, ioc->alt_ioc->cached_fw)); ioc->name, ioc->alt_ioc->name, ioc->alt_ioc->cached_fw));
ioc->alt_ioc->cached_fw = NULL;
} }
} else { } else {
printk(KERN_WARNING MYNAM ": firmware upload failure!\n"); printk(KERN_WARNING MYNAM ": firmware upload failure!\n");
@@ -1885,7 +1883,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
/* FIXME? Examine results here? */ /* FIXME? Examine results here? */
} }
out: out:
if ((ret != 0) && irq_allocated) { if ((ret != 0) && irq_allocated) {
free_irq(ioc->pci_irq, ioc); free_irq(ioc->pci_irq, ioc);
if (mpt_msi_enable) if (mpt_msi_enable)
@@ -2670,6 +2668,7 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepFlag)
dinitprintk((MYIOC_s_INFO_FMT "INFO - Wait IOC_OPERATIONAL state (cnt=%d)\n", dinitprintk((MYIOC_s_INFO_FMT "INFO - Wait IOC_OPERATIONAL state (cnt=%d)\n",
ioc->name, count)); ioc->name, count));
ioc->aen_event_read_flag=0;
return r; return r;
} }
@@ -2737,6 +2736,8 @@ mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size)
if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) { if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) {
ioc->cached_fw = ioc->alt_ioc->cached_fw; /* use alt_ioc's memory */ ioc->cached_fw = ioc->alt_ioc->cached_fw; /* use alt_ioc's memory */
ioc->cached_fw_dma = ioc->alt_ioc->cached_fw_dma; ioc->cached_fw_dma = ioc->alt_ioc->cached_fw_dma;
ioc->alloc_total += size;
ioc->alt_ioc->alloc_total -= size;
} else { } else {
if ( (ioc->cached_fw = pci_alloc_consistent(ioc->pcidev, size, &ioc->cached_fw_dma) ) ) if ( (ioc->cached_fw = pci_alloc_consistent(ioc->pcidev, size, &ioc->cached_fw_dma) ) )
ioc->alloc_total += size; ioc->alloc_total += size;
@@ -3166,6 +3167,7 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag)
static int static int
mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
{ {
MPT_ADAPTER *iocp=NULL;
u32 diag0val; u32 diag0val;
u32 doorbell; u32 doorbell;
int hard_reset_done = 0; int hard_reset_done = 0;
@@ -3301,17 +3303,23 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
/* FIXME? Examine results here? */ /* FIXME? Examine results here? */
} }
if (ioc->cached_fw) { if (ioc->cached_fw)
iocp = ioc;
else if (ioc->alt_ioc && ioc->alt_ioc->cached_fw)
iocp = ioc->alt_ioc;
if (iocp) {
/* If the DownloadBoot operation fails, the /* If the DownloadBoot operation fails, the
* IOC will be left unusable. This is a fatal error * IOC will be left unusable. This is a fatal error
* case. _diag_reset will return < 0 * case. _diag_reset will return < 0
*/ */
for (count = 0; count < 30; count ++) { for (count = 0; count < 30; count ++) {
diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); diag0val = CHIPREG_READ32(&iocp->chip->Diagnostic);
if (!(diag0val & MPI_DIAG_RESET_ADAPTER)) { if (!(diag0val & MPI_DIAG_RESET_ADAPTER)) {
break; break;
} }
dprintk((MYIOC_s_INFO_FMT "cached_fw: diag0val=%x count=%d\n",
iocp->name, diag0val, count));
/* wait 1 sec */ /* wait 1 sec */
if (sleepFlag == CAN_SLEEP) { if (sleepFlag == CAN_SLEEP) {
msleep (1000); msleep (1000);
@@ -3320,7 +3328,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
} }
} }
if ((count = mpt_downloadboot(ioc, if ((count = mpt_downloadboot(ioc,
(MpiFwHeader_t *)ioc->cached_fw, sleepFlag)) < 0) { (MpiFwHeader_t *)iocp->cached_fw, sleepFlag)) < 0) {
printk(KERN_WARNING MYNAM printk(KERN_WARNING MYNAM
": firmware downloadboot failure (%d)!\n", count); ": firmware downloadboot failure (%d)!\n", count);
} }
@@ -3907,18 +3915,18 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
if (sleepFlag == CAN_SLEEP) { if (sleepFlag == CAN_SLEEP) {
while (--cntdn) { while (--cntdn) {
msleep (1);
intstat = CHIPREG_READ32(&ioc->chip->IntStatus); intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS))
break; break;
msleep (1);
count++; count++;
} }
} else { } else {
while (--cntdn) { while (--cntdn) {
mdelay (1);
intstat = CHIPREG_READ32(&ioc->chip->IntStatus); intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS))
break; break;
mdelay (1);
count++; count++;
} }
} }
@@ -4883,6 +4891,7 @@ mpt_read_ioc_pg_4(MPT_ADAPTER *ioc)
pIoc4 = pci_alloc_consistent(ioc->pcidev, iocpage4sz, &ioc4_dma); pIoc4 = pci_alloc_consistent(ioc->pcidev, iocpage4sz, &ioc4_dma);
if (!pIoc4) if (!pIoc4)
return; return;
ioc->alloc_total += iocpage4sz;
} else { } else {
ioc4_dma = ioc->spi_data.IocPg4_dma; ioc4_dma = ioc->spi_data.IocPg4_dma;
iocpage4sz = ioc->spi_data.IocPg4Sz; iocpage4sz = ioc->spi_data.IocPg4Sz;
@@ -4899,6 +4908,7 @@ mpt_read_ioc_pg_4(MPT_ADAPTER *ioc)
} else { } else {
pci_free_consistent(ioc->pcidev, iocpage4sz, pIoc4, ioc4_dma); pci_free_consistent(ioc->pcidev, iocpage4sz, pIoc4, ioc4_dma);
ioc->spi_data.pIocPg4 = NULL; ioc->spi_data.pIocPg4 = NULL;
ioc->alloc_total -= iocpage4sz;
} }
} }
@@ -5030,19 +5040,18 @@ SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp)
EventAck_t *pAck; EventAck_t *pAck;
if ((pAck = (EventAck_t *) mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) { if ((pAck = (EventAck_t *) mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {
printk(MYIOC_s_WARN_FMT "Unable to allocate event ACK " dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
"request frame for Event=%x EventContext=%x EventData=%x!\n", ioc->name,__FUNCTION__));
ioc->name, evnp->Event, le32_to_cpu(evnp->EventContext),
le32_to_cpu(evnp->Data[0]));
return -1; return -1;
} }
memset(pAck, 0, sizeof(*pAck));
dprintk((MYIOC_s_INFO_FMT "Sending EventAck\n", ioc->name)); devtverboseprintk((MYIOC_s_INFO_FMT "Sending EventAck\n", ioc->name));
pAck->Function = MPI_FUNCTION_EVENT_ACK; pAck->Function = MPI_FUNCTION_EVENT_ACK;
pAck->ChainOffset = 0; pAck->ChainOffset = 0;
pAck->Reserved[0] = pAck->Reserved[1] = 0;
pAck->MsgFlags = 0; pAck->MsgFlags = 0;
pAck->Reserved1[0] = pAck->Reserved1[1] = pAck->Reserved1[2] = 0;
pAck->Event = evnp->Event; pAck->Event = evnp->Event;
pAck->EventContext = evnp->EventContext; pAck->EventContext = evnp->EventContext;
@@ -5704,9 +5713,9 @@ EventDescriptionStr(u8 event, u32 evData0, char *evStr)
break; break;
case MPI_EVENT_EVENT_CHANGE: case MPI_EVENT_EVENT_CHANGE:
if (evData0) if (evData0)
ds = "Events(ON) Change"; ds = "Events ON";
else else
ds = "Events(OFF) Change"; ds = "Events OFF";
break; break;
case MPI_EVENT_INTEGRATED_RAID: case MPI_EVENT_INTEGRATED_RAID:
{ {
@@ -5777,8 +5786,27 @@ EventDescriptionStr(u8 event, u32 evData0, char *evStr)
break; break;
case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED: case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
snprintf(evStr, EVENT_DESCR_STR_SZ, snprintf(evStr, EVENT_DESCR_STR_SZ,
"SAS Device Status Change: No Persistancy " "SAS Device Status Change: No Persistancy: id=%d", id);
"Added: id=%d", id); break;
case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
snprintf(evStr, EVENT_DESCR_STR_SZ,
"SAS Device Status Change: Internal Device Reset : id=%d", id);
break;
case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL:
snprintf(evStr, EVENT_DESCR_STR_SZ,
"SAS Device Status Change: Internal Task Abort : id=%d", id);
break;
case MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL:
snprintf(evStr, EVENT_DESCR_STR_SZ,
"SAS Device Status Change: Internal Abort Task Set : id=%d", id);
break;
case MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL:
snprintf(evStr, EVENT_DESCR_STR_SZ,
"SAS Device Status Change: Internal Clear Task Set : id=%d", id);
break;
case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL:
snprintf(evStr, EVENT_DESCR_STR_SZ,
"SAS Device Status Change: Internal Query Task : id=%d", id);
break; break;
default: default:
snprintf(evStr, EVENT_DESCR_STR_SZ, snprintf(evStr, EVENT_DESCR_STR_SZ,
@@ -6034,7 +6062,7 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
* @ioc: Pointer to MPT_ADAPTER structure * @ioc: Pointer to MPT_ADAPTER structure
* @log_info: U32 LogInfo reply word from the IOC * @log_info: U32 LogInfo reply word from the IOC
* *
* Refer to lsi/fc_log.h. * Refer to lsi/mpi_log_fc.h.
*/ */
static void static void
mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info) mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info)
@@ -6131,8 +6159,10 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info)
"Invalid SAS Address", /* 01h */ "Invalid SAS Address", /* 01h */
NULL, /* 02h */ NULL, /* 02h */
"Invalid Page", /* 03h */ "Invalid Page", /* 03h */
NULL, /* 04h */ "Diag Message Error", /* 04h */
"Task Terminated" /* 05h */ "Task Terminated", /* 05h */
"Enclosure Management", /* 06h */
"Target Mode" /* 07h */
}; };
static char *pl_code_str[] = { static char *pl_code_str[] = {
NULL, /* 00h */ NULL, /* 00h */
@@ -6158,7 +6188,7 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info)
"IO Executed", /* 14h */ "IO Executed", /* 14h */
"Persistant Reservation Out Not Affiliation Owner", /* 15h */ "Persistant Reservation Out Not Affiliation Owner", /* 15h */
"Open Transmit DMA Abort", /* 16h */ "Open Transmit DMA Abort", /* 16h */
NULL, /* 17h */ "IO Device Missing Delay Retry", /* 17h */
NULL, /* 18h */ NULL, /* 18h */
NULL, /* 19h */ NULL, /* 19h */
NULL, /* 1Ah */ NULL, /* 1Ah */
@@ -6238,7 +6268,7 @@ static void
mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf) mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf)
{ {
u32 status = ioc_status & MPI_IOCSTATUS_MASK; u32 status = ioc_status & MPI_IOCSTATUS_MASK;
char *desc = ""; char *desc = NULL;
switch (status) { switch (status) {
case MPI_IOCSTATUS_INVALID_FUNCTION: /* 0x0001 */ case MPI_IOCSTATUS_INVALID_FUNCTION: /* 0x0001 */
@@ -6348,7 +6378,7 @@ mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf)
desc = "Others"; desc = "Others";
break; break;
} }
if (desc != "") if (desc != NULL)
printk(MYIOC_s_INFO_FMT "IOCStatus(0x%04x): %s\n", ioc->name, status, desc); printk(MYIOC_s_INFO_FMT "IOCStatus(0x%04x): %s\n", ioc->name, status, desc);
} }
@@ -6386,7 +6416,6 @@ EXPORT_SYMBOL(mpt_alloc_fw_memory);
EXPORT_SYMBOL(mpt_free_fw_memory); EXPORT_SYMBOL(mpt_free_fw_memory);
EXPORT_SYMBOL(mptbase_sas_persist_operation); EXPORT_SYMBOL(mptbase_sas_persist_operation);
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* /*
* fusion_init - Fusion MPT base driver initialization routine. * fusion_init - Fusion MPT base driver initialization routine.
+6 -7
View File
@@ -75,8 +75,8 @@
#define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR
#endif #endif
#define MPT_LINUX_VERSION_COMMON "3.04.00" #define MPT_LINUX_VERSION_COMMON "3.04.01"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.00" #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.01"
#define WHAT_MAGIC_STRING "@" "(" "#" ")" #define WHAT_MAGIC_STRING "@" "(" "#" ")"
#define show_mptmod_ver(s,ver) \ #define show_mptmod_ver(s,ver) \
@@ -307,8 +307,8 @@ typedef struct _SYSIF_REGS
u32 HostIndex; /* 50 Host Index register */ u32 HostIndex; /* 50 Host Index register */
u32 Reserved4[15]; /* 54-8F */ u32 Reserved4[15]; /* 54-8F */
u32 Fubar; /* 90 For Fubar usage */ u32 Fubar; /* 90 For Fubar usage */
u32 Reserved5[1050];/* 94-10F8 */ u32 Reserved5[1050];/* 94-10F8 */
u32 Reset_1078; /* 10FC Reset 1078 */ u32 Reset_1078; /* 10FC Reset 1078 */
} SYSIF_REGS; } SYSIF_REGS;
/* /*
@@ -363,6 +363,7 @@ typedef struct _VirtDevice {
#define MPT_TARGET_FLAGS_VALID_56 0x10 #define MPT_TARGET_FLAGS_VALID_56 0x10
#define MPT_TARGET_FLAGS_SAF_TE_ISSUED 0x20 #define MPT_TARGET_FLAGS_SAF_TE_ISSUED 0x20
#define MPT_TARGET_FLAGS_RAID_COMPONENT 0x40 #define MPT_TARGET_FLAGS_RAID_COMPONENT 0x40
#define MPT_TARGET_FLAGS_LED_ON 0x80
/* /*
* /proc/mpt interface * /proc/mpt interface
@@ -634,7 +635,6 @@ typedef struct _MPT_ADAPTER
u16 handle; u16 handle;
int sas_index; /* index refrencing */ int sas_index; /* index refrencing */
MPT_SAS_MGMT sas_mgmt; MPT_SAS_MGMT sas_mgmt;
int num_ports;
struct work_struct sas_persist_task; struct work_struct sas_persist_task;
struct work_struct fc_setup_reset_work; struct work_struct fc_setup_reset_work;
@@ -644,7 +644,6 @@ typedef struct _MPT_ADAPTER
struct work_struct fc_rescan_work; struct work_struct fc_rescan_work;
char fc_rescan_work_q_name[KOBJ_NAME_LEN]; char fc_rescan_work_q_name[KOBJ_NAME_LEN];
struct workqueue_struct *fc_rescan_work_q; struct workqueue_struct *fc_rescan_work_q;
u8 port_serial_number;
} MPT_ADAPTER; } MPT_ADAPTER;
/* /*
@@ -982,7 +981,7 @@ typedef struct _MPT_SCSI_HOST {
wait_queue_head_t scandv_waitq; wait_queue_head_t scandv_waitq;
int scandv_wait_done; int scandv_wait_done;
long last_queue_full; long last_queue_full;
u8 mpt_pq_filter; u16 tm_iocstatus;
} MPT_SCSI_HOST; } MPT_SCSI_HOST;
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+2 -2
View File
@@ -2332,7 +2332,7 @@ done_free_mem:
} }
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* Prototype Routine for the HP HOST INFO command. /* Prototype Routine for the HOST INFO command.
* *
* Outputs: None. * Outputs: None.
* Return: 0 if successful * Return: 0 if successful
@@ -2568,7 +2568,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
} }
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* Prototype Routine for the HP TARGET INFO command. /* Prototype Routine for the TARGET INFO command.
* *
* Outputs: None. * Outputs: None.
* Return: 0 if successful * Return: 0 if successful
-5
View File
@@ -354,9 +354,6 @@ struct mpt_ioctl_command32 {
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
* HP Specific IOCTL Defines and Structures
*/
#define CPQFCTS_IOC_MAGIC 'Z' #define CPQFCTS_IOC_MAGIC 'Z'
#define HP_IOC_MAGIC 'Z' #define HP_IOC_MAGIC 'Z'
@@ -364,8 +361,6 @@ struct mpt_ioctl_command32 {
#define HP_GETHOSTINFO1 _IOR(HP_IOC_MAGIC, 20, hp_host_info_rev0_t) #define HP_GETHOSTINFO1 _IOR(HP_IOC_MAGIC, 20, hp_host_info_rev0_t)
#define HP_GETTARGETINFO _IOR(HP_IOC_MAGIC, 21, hp_target_info_t) #define HP_GETTARGETINFO _IOR(HP_IOC_MAGIC, 21, hp_target_info_t)
/* All HP IOCTLs must include this header
*/
typedef struct _hp_header { typedef struct _hp_header {
unsigned int iocnum; unsigned int iocnum;
unsigned int host; unsigned int host;
+1 -13
View File
@@ -77,10 +77,6 @@ MODULE_DESCRIPTION(my_NAME);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
/* Command line args */ /* Command line args */
static int mpt_pq_filter = 0;
module_param(mpt_pq_filter, int, 0);
MODULE_PARM_DESC(mpt_pq_filter, " Enable peripheral qualifier filter: enable=1 (default=0)");
#define MPTFC_DEV_LOSS_TMO (60) #define MPTFC_DEV_LOSS_TMO (60)
static int mptfc_dev_loss_tmo = MPTFC_DEV_LOSS_TMO; /* reasonable default */ static int mptfc_dev_loss_tmo = MPTFC_DEV_LOSS_TMO; /* reasonable default */
module_param(mptfc_dev_loss_tmo, int, 0); module_param(mptfc_dev_loss_tmo, int, 0);
@@ -513,8 +509,7 @@ mptfc_slave_alloc(struct scsi_device *sdev)
if (vtarget->num_luns == 0) { if (vtarget->num_luns == 0) {
vtarget->ioc_id = hd->ioc->id; vtarget->ioc_id = hd->ioc->id;
vtarget->tflags = MPT_TARGET_FLAGS_Q_YES | vtarget->tflags = MPT_TARGET_FLAGS_Q_YES;
MPT_TARGET_FLAGS_VALID_INQUIRY;
hd->Targets[sdev->id] = vtarget; hd->Targets[sdev->id] = vtarget;
} }
@@ -1129,13 +1124,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
hd->timer.data = (unsigned long) hd; hd->timer.data = (unsigned long) hd;
hd->timer.function = mptscsih_timer_expired; hd->timer.function = mptscsih_timer_expired;
hd->mpt_pq_filter = mpt_pq_filter;
ddvprintk((MYIOC_s_INFO_FMT
"mpt_pq_filter %x\n",
ioc->name,
mpt_pq_filter));
init_waitqueue_head(&hd->scandv_waitq); init_waitqueue_head(&hd->scandv_waitq);
hd->scandv_wait_done = 0; hd->scandv_wait_done = 0;
hd->last_queue_full = 0; hd->last_queue_full = 0;
+38 -71
View File
@@ -67,20 +67,19 @@
#define my_VERSION MPT_LINUX_VERSION_COMMON #define my_VERSION MPT_LINUX_VERSION_COMMON
#define MYNAM "mptsas" #define MYNAM "mptsas"
/*
* Reserved channel for integrated raid
*/
#define MPTSAS_RAID_CHANNEL 1
MODULE_AUTHOR(MODULEAUTHOR); MODULE_AUTHOR(MODULEAUTHOR);
MODULE_DESCRIPTION(my_NAME); MODULE_DESCRIPTION(my_NAME);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static int mpt_pq_filter;
module_param(mpt_pq_filter, int, 0);
MODULE_PARM_DESC(mpt_pq_filter,
"Enable peripheral qualifier filter: enable=1 "
"(default=0)");
static int mpt_pt_clear; static int mpt_pt_clear;
module_param(mpt_pt_clear, int, 0); module_param(mpt_pt_clear, int, 0);
MODULE_PARM_DESC(mpt_pt_clear, MODULE_PARM_DESC(mpt_pt_clear,
"Clear persistency table: enable=1 " " Clear persistency table: enable=1 "
"(default=MPTSCSIH_PT_CLEAR=0)"); "(default=MPTSCSIH_PT_CLEAR=0)");
static int mptsasDoneCtx = -1; static int mptsasDoneCtx = -1;
@@ -144,7 +143,6 @@ struct mptsas_devinfo {
* Specific details on ports, wide/narrow * Specific details on ports, wide/narrow
*/ */
struct mptsas_portinfo_details{ struct mptsas_portinfo_details{
u8 port_id; /* port number provided to transport */
u16 num_phys; /* number of phys belong to this port */ u16 num_phys; /* number of phys belong to this port */
u64 phy_bitmask; /* TODO, extend support for 255 phys */ u64 phy_bitmask; /* TODO, extend support for 255 phys */
struct sas_rphy *rphy; /* transport layer rphy object */ struct sas_rphy *rphy; /* transport layer rphy object */
@@ -350,10 +348,10 @@ mptsas_port_delete(struct mptsas_portinfo_details * port_details)
port_info = port_details->port_info; port_info = port_details->port_info;
phy_info = port_info->phy_info; phy_info = port_info->phy_info;
dsaswideprintk((KERN_DEBUG "%s: [%p]: port=%02d num_phys=%02d " dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d "
"bitmask=0x%016llX\n", "bitmask=0x%016llX\n",
__FUNCTION__, port_details, port_details->port_id, __FUNCTION__, port_details, port_details->num_phys,
port_details->num_phys, port_details->phy_bitmask)); port_details->phy_bitmask));
for (i = 0; i < port_info->num_phys; i++, phy_info++) { for (i = 0; i < port_info->num_phys; i++, phy_info++) {
if(phy_info->port_details != port_details) if(phy_info->port_details != port_details)
@@ -462,9 +460,8 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
* phy be removed by firmware events. * phy be removed by firmware events.
*/ */
dsaswideprintk((KERN_DEBUG dsaswideprintk((KERN_DEBUG
"%s: [%p]: port=%d deleting phy = %d\n", "%s: [%p]: deleting phy = %d\n",
__FUNCTION__, port_details, __FUNCTION__, port_details, i));
port_details->port_id, i));
port_details->num_phys--; port_details->num_phys--;
port_details->phy_bitmask &= ~ (1 << phy_info->phy_id); port_details->phy_bitmask &= ~ (1 << phy_info->phy_id);
memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo)); memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo));
@@ -493,7 +490,6 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
goto out; goto out;
port_details->num_phys = 1; port_details->num_phys = 1;
port_details->port_info = port_info; port_details->port_info = port_info;
port_details->port_id = ioc->port_serial_number++;
if (phy_info->phy_id < 64 ) if (phy_info->phy_id < 64 )
port_details->phy_bitmask |= port_details->phy_bitmask |=
(1 << phy_info->phy_id); (1 << phy_info->phy_id);
@@ -525,12 +521,8 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
mptsas_get_port(phy_info_cmp); mptsas_get_port(phy_info_cmp);
port_details->starget = port_details->starget =
mptsas_get_starget(phy_info_cmp); mptsas_get_starget(phy_info_cmp);
port_details->port_id =
phy_info_cmp->port_details->port_id;
port_details->num_phys = port_details->num_phys =
phy_info_cmp->port_details->num_phys; phy_info_cmp->port_details->num_phys;
// port_info->port_serial_number--;
ioc->port_serial_number--;
if (!phy_info_cmp->port_details->num_phys) if (!phy_info_cmp->port_details->num_phys)
kfree(phy_info_cmp->port_details); kfree(phy_info_cmp->port_details);
} else } else
@@ -554,11 +546,11 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
if (!port_details) if (!port_details)
continue; continue;
dsaswideprintk((KERN_DEBUG dsaswideprintk((KERN_DEBUG
"%s: [%p]: phy_id=%02d port_id=%02d num_phys=%02d " "%s: [%p]: phy_id=%02d num_phys=%02d "
"bitmask=0x%016llX\n", "bitmask=0x%016llX\n",
__FUNCTION__, __FUNCTION__,
port_details, i, port_details->port_id, port_details, i, port_details->num_phys,
port_details->num_phys, port_details->phy_bitmask)); port_details->phy_bitmask));
dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n", dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n",
port_details->port, port_details->rphy)); port_details->port, port_details->rphy));
} }
@@ -651,16 +643,13 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure,
static int static int
mptsas_slave_configure(struct scsi_device *sdev) mptsas_slave_configure(struct scsi_device *sdev)
{ {
struct Scsi_Host *host = sdev->host;
MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata;
/* if (sdev->channel == MPTSAS_RAID_CHANNEL)
* RAID volumes placed beyond the last expected port. goto out;
* Ignore sending sas mode pages in that case..
*/
if (sdev->channel < hd->ioc->num_ports)
sas_read_port_mode_page(sdev);
sas_read_port_mode_page(sdev);
out:
return mptscsih_slave_configure(sdev); return mptscsih_slave_configure(sdev);
} }
@@ -689,10 +678,7 @@ mptsas_target_alloc(struct scsi_target *starget)
hd->Targets[target_id] = vtarget; hd->Targets[target_id] = vtarget;
/* if (starget->channel == MPTSAS_RAID_CHANNEL)
* RAID volumes placed beyond the last expected port.
*/
if (starget->channel == hd->ioc->num_ports)
goto out; goto out;
rphy = dev_to_rphy(starget->dev.parent); rphy = dev_to_rphy(starget->dev.parent);
@@ -743,7 +729,7 @@ mptsas_target_destroy(struct scsi_target *starget)
if (!starget->hostdata) if (!starget->hostdata)
return; return;
if (starget->channel == hd->ioc->num_ports) if (starget->channel == MPTSAS_RAID_CHANNEL)
goto out; goto out;
rphy = dev_to_rphy(starget->dev.parent); rphy = dev_to_rphy(starget->dev.parent);
@@ -783,10 +769,7 @@ mptsas_slave_alloc(struct scsi_device *sdev)
starget = scsi_target(sdev); starget = scsi_target(sdev);
vdev->vtarget = starget->hostdata; vdev->vtarget = starget->hostdata;
/* if (sdev->channel == MPTSAS_RAID_CHANNEL)
* RAID volumes placed beyond the last expected port.
*/
if (sdev->channel == hd->ioc->num_ports)
goto out; goto out;
rphy = dev_to_rphy(sdev->sdev_target->dev.parent); rphy = dev_to_rphy(sdev->sdev_target->dev.parent);
@@ -1608,11 +1591,7 @@ static int mptsas_probe_one_phy(struct device *dev,
if (phy_info->sas_port_add_phy) { if (phy_info->sas_port_add_phy) {
if (!port) { if (!port) {
port = sas_port_alloc(dev, port = sas_port_alloc_num(dev);
phy_info->port_details->port_id);
dsaswideprintk((KERN_DEBUG
"sas_port_alloc: port=%p dev=%p port_id=%d\n",
port, dev, phy_info->port_details->port_id));
if (!port) { if (!port) {
error = -ENOMEM; error = -ENOMEM;
goto out; goto out;
@@ -1625,6 +1604,9 @@ static int mptsas_probe_one_phy(struct device *dev,
goto out; goto out;
} }
mptsas_set_port(phy_info, port); mptsas_set_port(phy_info, port);
dsaswideprintk((KERN_DEBUG
"sas_port_alloc: port=%p dev=%p port_id=%d\n",
port, dev, port->port_identifier));
} }
dsaswideprintk((KERN_DEBUG "sas_port_add_phy: phy_id=%d\n", dsaswideprintk((KERN_DEBUG "sas_port_add_phy: phy_id=%d\n",
phy_info->phy_id)); phy_info->phy_id));
@@ -1736,7 +1718,6 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
hba = NULL; hba = NULL;
} }
mutex_unlock(&ioc->sas_topology_mutex); mutex_unlock(&ioc->sas_topology_mutex);
ioc->num_ports = port_info->num_phys;
for (i = 0; i < port_info->num_phys; i++) { for (i = 0; i < port_info->num_phys; i++) {
mptsas_sas_phy_pg0(ioc, &port_info->phy_info[i], mptsas_sas_phy_pg0(ioc, &port_info->phy_info[i],
@@ -1939,7 +1920,8 @@ mptsas_delete_expander_phys(MPT_ADAPTER *ioc)
expander_sas_address) expander_sas_address)
continue; continue;
#ifdef MPT_DEBUG_SAS_WIDE #ifdef MPT_DEBUG_SAS_WIDE
dev_printk(KERN_DEBUG, &port->dev, "delete\n"); dev_printk(KERN_DEBUG, &port->dev,
"delete port (%d)\n", port->port_identifier);
#endif #endif
sas_port_delete(port); sas_port_delete(port);
mptsas_port_delete(phy_info->port_details); mptsas_port_delete(phy_info->port_details);
@@ -1984,7 +1966,7 @@ mptsas_scan_sas_topology(MPT_ADAPTER *ioc)
if (!ioc->raid_data.pIocPg2->NumActiveVolumes) if (!ioc->raid_data.pIocPg2->NumActiveVolumes)
goto out; goto out;
for (i=0; i<ioc->raid_data.pIocPg2->NumActiveVolumes; i++) { for (i=0; i<ioc->raid_data.pIocPg2->NumActiveVolumes; i++) {
scsi_add_device(ioc->sh, ioc->num_ports, scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL,
ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, 0); ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, 0);
} }
out: out:
@@ -2185,7 +2167,8 @@ mptsas_hotplug_work(void *arg)
ioc->name, ds, ev->channel, ev->id, phy_info->phy_id); ioc->name, ds, ev->channel, ev->id, phy_info->phy_id);
#ifdef MPT_DEBUG_SAS_WIDE #ifdef MPT_DEBUG_SAS_WIDE
dev_printk(KERN_DEBUG, &port->dev, "delete\n"); dev_printk(KERN_DEBUG, &port->dev,
"delete port (%d)\n", port->port_identifier);
#endif #endif
sas_port_delete(port); sas_port_delete(port);
mptsas_port_delete(phy_info->port_details); mptsas_port_delete(phy_info->port_details);
@@ -2289,35 +2272,26 @@ mptsas_hotplug_work(void *arg)
mptsas_set_rphy(phy_info, rphy); mptsas_set_rphy(phy_info, rphy);
break; break;
case MPTSAS_ADD_RAID: case MPTSAS_ADD_RAID:
sdev = scsi_device_lookup( sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
ioc->sh, ev->id, 0);
ioc->num_ports,
ev->id,
0);
if (sdev) { if (sdev) {
scsi_device_put(sdev); scsi_device_put(sdev);
break; break;
} }
printk(MYIOC_s_INFO_FMT printk(MYIOC_s_INFO_FMT
"attaching raid volume, channel %d, id %d\n", "attaching raid volume, channel %d, id %d\n",
ioc->name, ioc->num_ports, ev->id); ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
scsi_add_device(ioc->sh, scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, ev->id, 0);
ioc->num_ports,
ev->id,
0);
mpt_findImVolumes(ioc); mpt_findImVolumes(ioc);
break; break;
case MPTSAS_DEL_RAID: case MPTSAS_DEL_RAID:
sdev = scsi_device_lookup( sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL,
ioc->sh, ev->id, 0);
ioc->num_ports,
ev->id,
0);
if (!sdev) if (!sdev)
break; break;
printk(MYIOC_s_INFO_FMT printk(MYIOC_s_INFO_FMT
"removing raid volume, channel %d, id %d\n", "removing raid volume, channel %d, id %d\n",
ioc->name, ioc->num_ports, ev->id); ioc->name, MPTSAS_RAID_CHANNEL, ev->id);
vdevice = sdev->hostdata; vdevice = sdev->hostdata;
vdevice->vtarget->deleted = 1; vdevice->vtarget->deleted = 1;
mptsas_target_reset(ioc, vdevice->vtarget); mptsas_target_reset(ioc, vdevice->vtarget);
@@ -2723,7 +2697,6 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
hd->timer.data = (unsigned long) hd; hd->timer.data = (unsigned long) hd;
hd->timer.function = mptscsih_timer_expired; hd->timer.function = mptscsih_timer_expired;
hd->mpt_pq_filter = mpt_pq_filter;
ioc->sas_data.ptClear = mpt_pt_clear; ioc->sas_data.ptClear = mpt_pt_clear;
if (ioc->sas_data.ptClear==1) { if (ioc->sas_data.ptClear==1) {
@@ -2731,12 +2704,6 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
ioc, MPI_SAS_OP_CLEAR_ALL_PERSISTENT); ioc, MPI_SAS_OP_CLEAR_ALL_PERSISTENT);
} }
ddvprintk((MYIOC_s_INFO_FMT
"mpt_pq_filter %x mpt_pq_filter %x\n",
ioc->name,
mpt_pq_filter,
mpt_pq_filter));
init_waitqueue_head(&hd->scandv_waitq); init_waitqueue_head(&hd->scandv_waitq);
hd->scandv_wait_done = 0; hd->scandv_wait_done = 0;
hd->last_queue_full = 0; hd->last_queue_full = 0;
+102 -16
View File
@@ -66,6 +66,7 @@
#include "mptbase.h" #include "mptbase.h"
#include "mptscsih.h" #include "mptscsih.h"
#include "lsi/mpi_log_sas.h"
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#define my_NAME "Fusion MPT SCSI Host driver" #define my_NAME "Fusion MPT SCSI Host driver"
@@ -127,7 +128,7 @@ static void mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx);
static void mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply); static void mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply);
static int mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd); static int mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd);
static int mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout ); static int mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout );
static u32 SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc); static int SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc);
static int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); static int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout);
@@ -497,6 +498,34 @@ nextSGEset:
return SUCCESS; return SUCCESS;
} /* mptscsih_AddSGE() */ } /* mptscsih_AddSGE() */
static void
mptscsih_issue_sep_command(MPT_ADAPTER *ioc, VirtTarget *vtarget,
U32 SlotStatus)
{
MPT_FRAME_HDR *mf;
SEPRequest_t *SEPMsg;
if (ioc->bus_type == FC)
return;
if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) {
dfailprintk((MYIOC_s_WARN_FMT "%s: no msg frames!!\n",
ioc->name,__FUNCTION__));
return;
}
SEPMsg = (SEPRequest_t *)mf;
SEPMsg->Function = MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR;
SEPMsg->Bus = vtarget->bus_id;
SEPMsg->TargetID = vtarget->target_id;
SEPMsg->Action = MPI_SEP_REQ_ACTION_WRITE_STATUS;
SEPMsg->SlotStatus = SlotStatus;
devtverboseprintk((MYIOC_s_WARN_FMT
"Sending SEP cmd=%x id=%d bus=%d\n",
ioc->name, SlotStatus, SEPMsg->TargetID, SEPMsg->Bus));
mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* /*
* mptscsih_io_done - Main SCSI IO callback routine registered to * mptscsih_io_done - Main SCSI IO callback routine registered to
@@ -520,6 +549,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
SCSIIORequest_t *pScsiReq; SCSIIORequest_t *pScsiReq;
SCSIIOReply_t *pScsiReply; SCSIIOReply_t *pScsiReply;
u16 req_idx, req_idx_MR; u16 req_idx, req_idx_MR;
VirtDevice *vdev;
VirtTarget *vtarget;
hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
@@ -538,6 +569,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
} }
sc = hd->ScsiLookup[req_idx]; sc = hd->ScsiLookup[req_idx];
hd->ScsiLookup[req_idx] = NULL;
if (sc == NULL) { if (sc == NULL) {
MPIHeader_t *hdr = (MPIHeader_t *)mf; MPIHeader_t *hdr = (MPIHeader_t *)mf;
@@ -553,6 +585,12 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
return 1; return 1;
} }
if ((unsigned char *)mf != sc->host_scribble) {
mptscsih_freeChainBuffers(ioc, req_idx);
return 1;
}
sc->host_scribble = NULL;
sc->result = DID_OK << 16; /* Set default reply as OK */ sc->result = DID_OK << 16; /* Set default reply as OK */
pScsiReq = (SCSIIORequest_t *) mf; pScsiReq = (SCSIIORequest_t *) mf;
pScsiReply = (SCSIIOReply_t *) mr; pScsiReply = (SCSIIOReply_t *) mr;
@@ -640,10 +678,36 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
if (hd->sel_timeout[pScsiReq->TargetID] < 0xFFFF) if (hd->sel_timeout[pScsiReq->TargetID] < 0xFFFF)
hd->sel_timeout[pScsiReq->TargetID]++; hd->sel_timeout[pScsiReq->TargetID]++;
vdev = sc->device->hostdata;
if (!vdev)
break;
vtarget = vdev->vtarget;
if (vtarget->tflags & MPT_TARGET_FLAGS_LED_ON) {
mptscsih_issue_sep_command(ioc, vtarget,
MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED);
vtarget->tflags &= ~MPT_TARGET_FLAGS_LED_ON;
}
break; break;
case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */
case MPI_IOCSTATUS_SCSI_IOC_TERMINATED: /* 0x004B */ case MPI_IOCSTATUS_SCSI_IOC_TERMINATED: /* 0x004B */
if ( ioc->bus_type == SAS ) {
u16 ioc_status = le16_to_cpu(pScsiReply->IOCStatus);
if (ioc_status & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) {
u32 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo);
log_info &=SAS_LOGINFO_MASK;
if (log_info == SAS_LOGINFO_NEXUS_LOSS) {
sc->result = (DID_BUS_BUSY << 16);
break;
}
}
}
/*
* Allow non-SAS & non-NEXUS_LOSS to drop into below code
*/
case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */
case MPI_IOCSTATUS_SCSI_EXT_TERMINATED: /* 0x004C */ case MPI_IOCSTATUS_SCSI_EXT_TERMINATED: /* 0x004C */
/* Linux handles an unsolicited DID_RESET better /* Linux handles an unsolicited DID_RESET better
* than an unsolicited DID_ABORT. * than an unsolicited DID_ABORT.
@@ -658,7 +722,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
sc->result=DID_SOFT_ERROR << 16; sc->result=DID_SOFT_ERROR << 16;
else /* Sufficient data transfer occurred */ else /* Sufficient data transfer occurred */
sc->result = (DID_OK << 16) | scsi_status; sc->result = (DID_OK << 16) | scsi_status;
dreplyprintk((KERN_NOTICE dreplyprintk((KERN_NOTICE
"RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->device->id)); "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->device->id));
break; break;
@@ -784,8 +848,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
sc->request_bufflen, sc->sc_data_direction); sc->request_bufflen, sc->sc_data_direction);
} }
hd->ScsiLookup[req_idx] = NULL;
sc->scsi_done(sc); /* Issue the command callback */ sc->scsi_done(sc); /* Issue the command callback */
/* Free Chain buffers */ /* Free Chain buffers */
@@ -827,9 +889,17 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
dmfprintk(( "flush: ScsiDone (mf=%p,sc=%p)\n", dmfprintk(( "flush: ScsiDone (mf=%p,sc=%p)\n",
mf, SCpnt)); mf, SCpnt));
/* Free Chain buffers */
mptscsih_freeChainBuffers(ioc, ii);
/* Free Message frames */
mpt_free_msg_frame(ioc, mf);
if ((unsigned char *)mf != SCpnt->host_scribble)
continue;
/* Set status, free OS resources (SG DMA buffers) /* Set status, free OS resources (SG DMA buffers)
* Do OS callback * Do OS callback
* Free driver resources (chain, msg buffers)
*/ */
if (SCpnt->use_sg) { if (SCpnt->use_sg) {
pci_unmap_sg(ioc->pcidev, pci_unmap_sg(ioc->pcidev,
@@ -845,12 +915,6 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
SCpnt->result = DID_RESET << 16; SCpnt->result = DID_RESET << 16;
SCpnt->host_scribble = NULL; SCpnt->host_scribble = NULL;
/* Free Chain buffers */
mptscsih_freeChainBuffers(ioc, ii);
/* Free Message frames */
mpt_free_msg_frame(ioc, mf);
SCpnt->scsi_done(SCpnt); /* Issue the command callback */ SCpnt->scsi_done(SCpnt); /* Issue the command callback */
} }
} }
@@ -887,10 +951,10 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
if ((sc = hd->ScsiLookup[ii]) != NULL) { if ((sc = hd->ScsiLookup[ii]) != NULL) {
mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(hd->ioc, ii); mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(hd->ioc, ii);
if (mf == NULL)
continue;
dsprintk(( "search_running: found (sc=%p, mf = %p) target %d, lun %d \n", dsprintk(( "search_running: found (sc=%p, mf = %p) target %d, lun %d \n",
hd->ScsiLookup[ii], mf, mf->TargetID, mf->LUN[1])); hd->ScsiLookup[ii], mf, mf->TargetID, mf->LUN[1]));
if ((mf->TargetID != ((u8)vdevice->vtarget->target_id)) || (mf->LUN[1] != ((u8) vdevice->lun))) if ((mf->TargetID != ((u8)vdevice->vtarget->target_id)) || (mf->LUN[1] != ((u8) vdevice->lun)))
continue; continue;
@@ -899,6 +963,8 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
hd->ScsiLookup[ii] = NULL; hd->ScsiLookup[ii] = NULL;
mptscsih_freeChainBuffers(hd->ioc, ii); mptscsih_freeChainBuffers(hd->ioc, ii);
mpt_free_msg_frame(hd->ioc, (MPT_FRAME_HDR *)mf); mpt_free_msg_frame(hd->ioc, (MPT_FRAME_HDR *)mf);
if ((unsigned char *)mf != sc->host_scribble)
continue;
if (sc->use_sg) { if (sc->use_sg) {
pci_unmap_sg(hd->ioc->pcidev, pci_unmap_sg(hd->ioc->pcidev,
(struct scatterlist *) sc->request_buffer, (struct scatterlist *) sc->request_buffer,
@@ -1341,8 +1407,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
goto fail; goto fail;
} }
SCpnt->host_scribble = (unsigned char *)mf;
hd->ScsiLookup[my_idx] = SCpnt; hd->ScsiLookup[my_idx] = SCpnt;
SCpnt->host_scribble = NULL;
mpt_put_msg_frame(hd->ioc->DoneCtx, hd->ioc, mf); mpt_put_msg_frame(hd->ioc->DoneCtx, hd->ioc, mf);
dmfprintk((MYIOC_s_INFO_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n", dmfprintk((MYIOC_s_INFO_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n",
@@ -1529,6 +1595,12 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, in
rc = mpt_HardResetHandler(hd->ioc, CAN_SLEEP); rc = mpt_HardResetHandler(hd->ioc, CAN_SLEEP);
} }
/*
* Check IOCStatus from TM reply message
*/
if (hd->tm_iocstatus != MPI_IOCSTATUS_SUCCESS)
rc = FAILED;
dtmprintk((MYIOC_s_INFO_FMT "TMHandler rc = %d!\n", hd->ioc->name, rc)); dtmprintk((MYIOC_s_INFO_FMT "TMHandler rc = %d!\n", hd->ioc->name, rc));
return rc; return rc;
@@ -1654,6 +1726,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
int scpnt_idx; int scpnt_idx;
int retval; int retval;
VirtDevice *vdev; VirtDevice *vdev;
ulong sn = SCpnt->serial_number;
/* If we can't locate our host adapter structure, return FAILED status. /* If we can't locate our host adapter structure, return FAILED status.
*/ */
@@ -1707,6 +1780,11 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
vdev->vtarget->bus_id, vdev->vtarget->target_id, vdev->lun, vdev->vtarget->bus_id, vdev->vtarget->target_id, vdev->lun,
ctx2abort, mptscsih_get_tm_timeout(hd->ioc)); ctx2abort, mptscsih_get_tm_timeout(hd->ioc));
if (SCPNT_TO_LOOKUP_IDX(SCpnt) == scpnt_idx &&
SCpnt->serial_number == sn) {
retval = FAILED;
}
printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n", printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n",
hd->ioc->name, hd->ioc->name,
((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
@@ -2023,6 +2101,7 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *m
DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply); DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply);
iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK; iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK;
hd->tm_iocstatus = iocstatus;
dtmprintk((MYIOC_s_WARN_FMT " SCSI TaskMgmt (%d) IOCStatus=%04x IOCLogInfo=%08x\n", dtmprintk((MYIOC_s_WARN_FMT " SCSI TaskMgmt (%d) IOCStatus=%04x IOCLogInfo=%08x\n",
ioc->name, tmType, iocstatus, le32_to_cpu(pScsiTmReply->IOCLogInfo))); ioc->name, tmType, iocstatus, le32_to_cpu(pScsiTmReply->IOCLogInfo)));
/* Error? (anything non-zero?) */ /* Error? (anything non-zero?) */
@@ -2401,6 +2480,13 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
ioc->events[idx].data[1] = (sense_data[13] << 8) || sense_data[12]; ioc->events[idx].data[1] = (sense_data[13] << 8) || sense_data[12];
ioc->eventContext++; ioc->eventContext++;
if (hd->ioc->pcidev->vendor ==
PCI_VENDOR_ID_IBM) {
mptscsih_issue_sep_command(hd->ioc,
vdev->vtarget, MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT);
vdev->vtarget->tflags |=
MPT_TARGET_FLAGS_LED_ON;
}
} }
} }
} else { } else {
@@ -2409,7 +2495,7 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
} }
} }
static u32 static int
SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc) SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc)
{ {
MPT_SCSI_HOST *hd; MPT_SCSI_HOST *hd;
+2 -8
View File
@@ -83,10 +83,6 @@ static int mpt_saf_te = MPTSCSIH_SAF_TE;
module_param(mpt_saf_te, int, 0); module_param(mpt_saf_te, int, 0);
MODULE_PARM_DESC(mpt_saf_te, " Force enabling SEP Processor: enable=1 (default=MPTSCSIH_SAF_TE=0)"); MODULE_PARM_DESC(mpt_saf_te, " Force enabling SEP Processor: enable=1 (default=MPTSCSIH_SAF_TE=0)");
static int mpt_pq_filter = 0;
module_param(mpt_pq_filter, int, 0);
MODULE_PARM_DESC(mpt_pq_filter, " Enable peripheral qualifier filter: enable=1 (default=0)");
static void mptspi_write_offset(struct scsi_target *, int); static void mptspi_write_offset(struct scsi_target *, int);
static void mptspi_write_width(struct scsi_target *, int); static void mptspi_write_width(struct scsi_target *, int);
static int mptspi_write_spi_device_pg1(struct scsi_target *, static int mptspi_write_spi_device_pg1(struct scsi_target *,
@@ -1047,14 +1043,12 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
hd->timer.function = mptscsih_timer_expired; hd->timer.function = mptscsih_timer_expired;
ioc->spi_data.Saf_Te = mpt_saf_te; ioc->spi_data.Saf_Te = mpt_saf_te;
hd->mpt_pq_filter = mpt_pq_filter;
hd->negoNvram = MPT_SCSICFG_USE_NVRAM; hd->negoNvram = MPT_SCSICFG_USE_NVRAM;
ddvprintk((MYIOC_s_INFO_FMT ddvprintk((MYIOC_s_INFO_FMT
"saf_te %x mpt_pq_filter %x\n", "saf_te %x\n",
ioc->name, ioc->name,
mpt_saf_te, mpt_saf_te));
mpt_pq_filter));
ioc->spi_data.noQas = 0; ioc->spi_data.noQas = 0;
init_waitqueue_head(&hd->scandv_waitq); init_waitqueue_head(&hd->scandv_waitq);
+4 -4
View File
@@ -3451,12 +3451,12 @@ create_cmd (Scsi_Cmnd *cmd) {
for (i = 0; cmd->use_sg ? (i < cmd->use_sg) : !i; cmd_datain += 4, for (i = 0; cmd->use_sg ? (i < cmd->use_sg) : !i; cmd_datain += 4,
cmd_dataout += 4, ++i) { cmd_dataout += 4, ++i) {
u32 vbuf = cmd->use_sg u32 vbuf = cmd->use_sg
? (u32)page_address(((struct scatterlist *)cmd->buffer)[i].page)+ ? (u32)page_address(((struct scatterlist *)cmd->request_buffer)[i].page)+
((struct scatterlist *)cmd->buffer)[i].offset ((struct scatterlist *)cmd->request_buffer)[i].offset
: (u32)(cmd->request_buffer); : (u32)(cmd->request_buffer);
u32 bbuf = virt_to_bus((void *)vbuf); u32 bbuf = virt_to_bus((void *)vbuf);
u32 count = cmd->use_sg ? u32 count = cmd->use_sg ?
((struct scatterlist *)cmd->buffer)[i].length : ((struct scatterlist *)cmd->request_buffer)[i].length :
cmd->request_bufflen; cmd->request_bufflen;
/* /*
@@ -5417,7 +5417,7 @@ insn_to_offset (Scsi_Cmnd *cmd, u32 *insn) {
if ((buffers = cmd->use_sg)) { if ((buffers = cmd->use_sg)) {
for (offset = 0, for (offset = 0,
segment = (struct scatterlist *) cmd->buffer; segment = (struct scatterlist *) cmd->request_buffer;
buffers && !((found = ((ptr >= (char *)page_address(segment->page)+segment->offset) && buffers && !((found = ((ptr >= (char *)page_address(segment->page)+segment->offset) &&
(ptr < ((char *)page_address(segment->page)+segment->offset+segment->length))))); (ptr < ((char *)page_address(segment->page)+segment->offset+segment->length)))));
--buffers, offset += segment->length, ++segment) --buffers, offset += segment->length, ++segment)
+1 -1
View File
@@ -911,7 +911,7 @@ static void esp_get_dmabufs(struct NCR_ESP *esp, Scsi_Cmnd *sp)
sp->SCp.ptr = sp->SCp.ptr =
(char *) virt_to_phys(sp->request_buffer); (char *) virt_to_phys(sp->request_buffer);
} else { } else {
sp->SCp.buffer = (struct scatterlist *) sp->buffer; sp->SCp.buffer = (struct scatterlist *) sp->request_buffer;
sp->SCp.buffers_residual = sp->use_sg - 1; sp->SCp.buffers_residual = sp->use_sg - 1;
sp->SCp.this_residual = sp->SCp.buffer->length; sp->SCp.this_residual = sp->SCp.buffer->length;
if (esp->dma_mmu_get_scsi_sgl) if (esp->dma_mmu_get_scsi_sgl)
+7 -7
View File
@@ -114,7 +114,7 @@ MODULE_DESCRIPTION("NCR Dual700 SCSI Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_param(NCR_D700, charp, 0); module_param(NCR_D700, charp, 0);
static __u8 __initdata id_array[2*(MCA_MAX_SLOT_NR + 1)] = static __u8 __devinitdata id_array[2*(MCA_MAX_SLOT_NR + 1)] =
{ [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 }; { [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 };
#ifdef MODULE #ifdef MODULE
@@ -173,7 +173,7 @@ struct NCR_D700_private {
char pad; char pad;
}; };
static int static int __devinit
NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq, NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq,
int slot, u32 region, int differential) int slot, u32 region, int differential)
{ {
@@ -243,7 +243,7 @@ NCR_D700_intr(int irq, void *data, struct pt_regs *regs)
* essentially connectecd to the MCA bus independently, it is easier * essentially connectecd to the MCA bus independently, it is easier
* to set them up as two separate host adapters, rather than one * to set them up as two separate host adapters, rather than one
* adapter with two channels */ * adapter with two channels */
static int static int __devinit
NCR_D700_probe(struct device *dev) NCR_D700_probe(struct device *dev)
{ {
struct NCR_D700_private *p; struct NCR_D700_private *p;
@@ -329,7 +329,7 @@ NCR_D700_probe(struct device *dev)
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
int err; int err;
if ((err = NCR_D700_probe_one(p, i, slot, irq, if ((err = NCR_D700_probe_one(p, i, irq, slot,
offset_addr + (0x80 * i), offset_addr + (0x80 * i),
differential)) != 0) differential)) != 0)
printk("D700: SIOP%d: probe failed, error = %d\n", printk("D700: SIOP%d: probe failed, error = %d\n",
@@ -349,7 +349,7 @@ NCR_D700_probe(struct device *dev)
return 0; return 0;
} }
static void static void __devexit
NCR_D700_remove_one(struct Scsi_Host *host) NCR_D700_remove_one(struct Scsi_Host *host)
{ {
scsi_remove_host(host); scsi_remove_host(host);
@@ -359,7 +359,7 @@ NCR_D700_remove_one(struct Scsi_Host *host)
release_region(host->base, 64); release_region(host->base, 64);
} }
static int static int __devexit
NCR_D700_remove(struct device *dev) NCR_D700_remove(struct device *dev)
{ {
struct NCR_D700_private *p = dev_get_drvdata(dev); struct NCR_D700_private *p = dev_get_drvdata(dev);
@@ -380,7 +380,7 @@ static struct mca_driver NCR_D700_driver = {
.name = "NCR_D700", .name = "NCR_D700",
.bus = &mca_bus_type, .bus = &mca_bus_type,
.probe = NCR_D700_probe, .probe = NCR_D700_probe,
.remove = NCR_D700_remove, .remove = __devexit_p(NCR_D700_remove),
}, },
}; };
+32 -11
View File
@@ -551,6 +551,11 @@ struct aha152x_hostdata {
struct aha152x_scdata { struct aha152x_scdata {
Scsi_Cmnd *next; /* next sc in queue */ Scsi_Cmnd *next; /* next sc in queue */
struct semaphore *sem; /* semaphore to block on */ struct semaphore *sem; /* semaphore to block on */
unsigned char cmd_len;
unsigned char cmnd[MAX_COMMAND_SIZE];
unsigned short use_sg;
unsigned request_bufflen;
void *request_buffer;
}; };
@@ -1006,11 +1011,20 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct semaphore *sem, int p
return FAILED; return FAILED;
} }
} else { } else {
struct aha152x_scdata *sc;
SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC); SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC);
if(SCpnt->host_scribble==0) { if(SCpnt->host_scribble==0) {
printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt)); printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt));
return FAILED; return FAILED;
} }
sc = SCDATA(SCpnt);
memcpy(sc->cmnd, SCpnt->cmnd, sizeof(sc->cmnd));
sc->request_buffer = SCpnt->request_buffer;
sc->request_bufflen = SCpnt->request_bufflen;
sc->use_sg = SCpnt->use_sg;
sc->cmd_len = SCpnt->cmd_len;
} }
SCNEXT(SCpnt) = NULL; SCNEXT(SCpnt) = NULL;
@@ -1165,6 +1179,10 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
DECLARE_MUTEX_LOCKED(sem); DECLARE_MUTEX_LOCKED(sem);
struct timer_list timer; struct timer_list timer;
int ret, issued, disconnected; int ret, issued, disconnected;
unsigned char old_cmd_len = SCpnt->cmd_len;
unsigned short old_use_sg = SCpnt->use_sg;
void *old_buffer = SCpnt->request_buffer;
unsigned old_bufflen = SCpnt->request_bufflen;
unsigned long flags; unsigned long flags;
#if defined(AHA152X_DEBUG) #if defined(AHA152X_DEBUG)
@@ -1198,11 +1216,11 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
add_timer(&timer); add_timer(&timer);
down(&sem); down(&sem);
del_timer(&timer); del_timer(&timer);
SCpnt->cmd_len = SCpnt->old_cmd_len; SCpnt->cmd_len = old_cmd_len;
SCpnt->use_sg = SCpnt->old_use_sg; SCpnt->use_sg = old_use_sg;
SCpnt->request_buffer = SCpnt->buffer; SCpnt->request_buffer = old_buffer;
SCpnt->request_bufflen = SCpnt->bufflen; SCpnt->request_bufflen = old_bufflen;
DO_LOCK(flags); DO_LOCK(flags);
@@ -1565,6 +1583,9 @@ static void busfree_run(struct Scsi_Host *shpnt)
#endif #endif
if(DONE_SC->SCp.phase & check_condition) { if(DONE_SC->SCp.phase & check_condition) {
struct scsi_cmnd *cmd = HOSTDATA(shpnt)->done_SC;
struct aha152x_scdata *sc = SCDATA(cmd);
#if 0 #if 0
if(HOSTDATA(shpnt)->debug & debug_eh) { if(HOSTDATA(shpnt)->debug & debug_eh) {
printk(ERR_LEAD "received sense: ", CMDINFO(DONE_SC)); printk(ERR_LEAD "received sense: ", CMDINFO(DONE_SC));
@@ -1573,13 +1594,13 @@ static void busfree_run(struct Scsi_Host *shpnt)
#endif #endif
/* restore old command */ /* restore old command */
memcpy((void *) DONE_SC->cmnd, (void *) DONE_SC->data_cmnd, sizeof(DONE_SC->data_cmnd)); memcpy(cmd->cmnd, sc->cmnd, sizeof(sc->cmnd));
DONE_SC->request_buffer = DONE_SC->buffer; cmd->request_buffer = sc->request_buffer;
DONE_SC->request_bufflen = DONE_SC->bufflen; cmd->request_bufflen = sc->request_bufflen;
DONE_SC->use_sg = DONE_SC->old_use_sg; cmd->use_sg = sc->use_sg;
DONE_SC->cmd_len = DONE_SC->old_cmd_len; cmd->cmd_len = sc->cmd_len;
DONE_SC->SCp.Status = 0x02; cmd->SCp.Status = 0x02;
HOSTDATA(shpnt)->commands--; HOSTDATA(shpnt)->commands--;
if (!HOSTDATA(shpnt)->commands) if (!HOSTDATA(shpnt)->commands)
+1 -1
View File
@@ -7289,7 +7289,7 @@ ahd_reset_cmds_pending(struct ahd_softc *ahd)
ahd->flags &= ~AHD_UPDATE_PEND_CMDS; ahd->flags &= ~AHD_UPDATE_PEND_CMDS;
} }
void static void
ahd_done_with_status(struct ahd_softc *ahd, struct scb *scb, uint32_t status) ahd_done_with_status(struct ahd_softc *ahd, struct scb *scb, uint32_t status)
{ {
cam_status ostat; cam_status ostat;
-21
View File
@@ -242,25 +242,6 @@ ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
*/ */
static uint32_t aic79xx_no_reset; static uint32_t aic79xx_no_reset;
/*
* Certain PCI motherboards will scan PCI devices from highest to lowest,
* others scan from lowest to highest, and they tend to do all kinds of
* strange things when they come into contact with PCI bridge chips. The
* net result of all this is that the PCI card that is actually used to boot
* the machine is very hard to detect. Most motherboards go from lowest
* PCI slot number to highest, and the first SCSI controller found is the
* one you boot from. The only exceptions to this are when a controller
* has its BIOS disabled. So, we by default sort all of our SCSI controllers
* from lowest PCI slot number to highest PCI slot number. We also force
* all controllers with their BIOS disabled to the end of the list. This
* works on *almost* all computers. Where it doesn't work, we have this
* option. Setting this option to non-0 will reverse the order of the sort
* to highest first, then lowest, but will still leave cards with their BIOS
* disabled at the very end. That should fix everyone up unless there are
* really strange cirumstances.
*/
static uint32_t aic79xx_reverse_scan;
/* /*
* Should we force EXTENDED translation on a controller. * Should we force EXTENDED translation on a controller.
* 0 == Use whatever is in the SEEPROM or default to off * 0 == Use whatever is in the SEEPROM or default to off
@@ -350,7 +331,6 @@ MODULE_PARM_DESC(aic79xx,
" periodically to prevent tag starvation.\n" " periodically to prevent tag starvation.\n"
" This may be required by some older disk\n" " This may be required by some older disk\n"
" or drives/RAID arrays.\n" " or drives/RAID arrays.\n"
" reverse_scan Sort PCI devices highest Bus/Slot to lowest\n"
" tag_info:<tag_str> Set per-target tag depth\n" " tag_info:<tag_str> Set per-target tag depth\n"
" global_tag_depth:<int> Global tag depth for all targets on all buses\n" " global_tag_depth:<int> Global tag depth for all targets on all buses\n"
" slewrate:<slewrate_list>Set the signal slew rate (0-15).\n" " slewrate:<slewrate_list>Set the signal slew rate (0-15).\n"
@@ -1031,7 +1011,6 @@ aic79xx_setup(char *s)
#ifdef AHD_DEBUG #ifdef AHD_DEBUG
{ "debug", &ahd_debug }, { "debug", &ahd_debug },
#endif #endif
{ "reverse_scan", &aic79xx_reverse_scan },
{ "periodic_otag", &aic79xx_periodic_otag }, { "periodic_otag", &aic79xx_periodic_otag },
{ "pci_parity", &aic79xx_pci_parity }, { "pci_parity", &aic79xx_pci_parity },
{ "seltime", &aic79xx_seltime }, { "seltime", &aic79xx_seltime },
-1
View File
@@ -353,7 +353,6 @@ MODULE_PARM_DESC(aic7xxx,
" periodically to prevent tag starvation.\n" " periodically to prevent tag starvation.\n"
" This may be required by some older disk\n" " This may be required by some older disk\n"
" drives or RAID arrays.\n" " drives or RAID arrays.\n"
" reverse_scan Sort PCI devices highest Bus/Slot to lowest\n"
" tag_info:<tag_str> Set per-target tag depth\n" " tag_info:<tag_str> Set per-target tag depth\n"
" global_tag_depth:<int> Global tag depth for every target\n" " global_tag_depth:<int> Global tag depth for every target\n"
" on every bus\n" " on every bus\n"
+1 -1
View File
@@ -507,7 +507,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
*/ */
if (cmd->use_sg) { if (cmd->use_sg) {
cmd->SCp.buffer = (struct scatterlist *) cmd->buffer; cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer;
cmd->SCp.buffers_residual = cmd->use_sg - 1; cmd->SCp.buffers_residual = cmd->use_sg - 1;
cmd->SCp.ptr = (char *)page_address(cmd->SCp.buffer->page)+ cmd->SCp.ptr = (char *)page_address(cmd->SCp.buffer->page)+
cmd->SCp.buffer->offset; cmd->SCp.buffer->offset;
+88 -38
View File
@@ -5,6 +5,7 @@
* Additions for SCSI 3+ (SPC-3 T10/1416-D Rev 07 3 May 2002) * Additions for SCSI 3+ (SPC-3 T10/1416-D Rev 07 3 May 2002)
* by D. Gilbert and aeb (20020609) * by D. Gilbert and aeb (20020609)
* Additions for SPC-3 T10/1416-D Rev 21 22 Sept 2004, D. Gilbert 20041025 * Additions for SPC-3 T10/1416-D Rev 21 22 Sept 2004, D. Gilbert 20041025
* Update to SPC-4 T10/1713-D Rev 5a, 14 June 2006, D. Gilbert 20060702
*/ */
#include <linux/blkdev.h> #include <linux/blkdev.h>
@@ -36,55 +37,56 @@ static const char * cdb_byte0_names[] = {
/* 00-03 */ "Test Unit Ready", "Rezero Unit/Rewind", NULL, "Request Sense", /* 00-03 */ "Test Unit Ready", "Rezero Unit/Rewind", NULL, "Request Sense",
/* 04-07 */ "Format Unit/Medium", "Read Block Limits", NULL, /* 04-07 */ "Format Unit/Medium", "Read Block Limits", NULL,
"Reasssign Blocks", "Reasssign Blocks",
/* 08-0d */ "Read (6)", NULL, "Write (6)", "Seek (6)", NULL, NULL, /* 08-0d */ "Read(6)", NULL, "Write(6)", "Seek(6)", NULL, NULL,
/* 0e-12 */ NULL, "Read Reverse", "Write Filemarks", "Space", "Inquiry", /* 0e-12 */ NULL, "Read Reverse", "Write Filemarks", "Space", "Inquiry",
/* 13-16 */ "Verify (6)", "Recover Buffered Data", "Mode Select (6)", /* 13-16 */ "Verify(6)", "Recover Buffered Data", "Mode Select(6)",
"Reserve (6)", "Reserve(6)",
/* 17-1a */ "Release (6)", "Copy", "Erase", "Mode Sense (6)", /* 17-1a */ "Release(6)", "Copy", "Erase", "Mode Sense(6)",
/* 1b-1d */ "Start/Stop Unit", "Receive Diagnostic", "Send Diagnostic", /* 1b-1d */ "Start/Stop Unit", "Receive Diagnostic", "Send Diagnostic",
/* 1e-1f */ "Prevent/Allow Medium Removal", NULL, /* 1e-1f */ "Prevent/Allow Medium Removal", NULL,
/* 20-22 */ NULL, NULL, NULL, /* 20-22 */ NULL, NULL, NULL,
/* 23-28 */ "Read Format Capacities", "Set Window", /* 23-28 */ "Read Format Capacities", "Set Window",
"Read Capacity (10)", NULL, NULL, "Read (10)", "Read Capacity(10)", NULL, NULL, "Read(10)",
/* 29-2d */ "Read Generation", "Write (10)", "Seek (10)", "Erase (10)", /* 29-2d */ "Read Generation", "Write(10)", "Seek(10)", "Erase(10)",
"Read updated block", "Read updated block",
/* 2e-31 */ "Write Verify (10)", "Verify (10)", "Search High", "Search Equal", /* 2e-31 */ "Write Verify(10)", "Verify(10)", "Search High", "Search Equal",
/* 32-34 */ "Search Low", "Set Limits", "Prefetch/Read Position", /* 32-34 */ "Search Low", "Set Limits", "Prefetch/Read Position",
/* 35-37 */ "Synchronize Cache (10)", "Lock/Unlock Cache (10)", /* 35-37 */ "Synchronize Cache(10)", "Lock/Unlock Cache(10)",
"Read Defect Data(10)", "Read Defect Data(10)",
/* 38-3c */ "Medium Scan", "Compare", "Copy Verify", "Write Buffer", /* 38-3c */ "Medium Scan", "Compare", "Copy Verify", "Write Buffer",
"Read Buffer", "Read Buffer",
/* 3d-3f */ "Update Block", "Read Long (10)", "Write Long (10)", /* 3d-3f */ "Update Block", "Read Long(10)", "Write Long(10)",
/* 40-41 */ "Change Definition", "Write Same (10)", /* 40-41 */ "Change Definition", "Write Same(10)",
/* 42-48 */ "Read sub-channel", "Read TOC/PMA/ATIP", "Read density support", /* 42-48 */ "Read sub-channel", "Read TOC/PMA/ATIP", "Read density support",
"Play audio (10)", "Get configuration", "Play audio msf", "Play audio(10)", "Get configuration", "Play audio msf",
"Play audio track/index", "Play audio track/index",
/* 49-4f */ "Play track relative (10)", "Get event status notification", /* 49-4f */ "Play track relative(10)", "Get event status notification",
"Pause/resume", "Log Select", "Log Sense", "Stop play/scan", "Pause/resume", "Log Select", "Log Sense", "Stop play/scan",
NULL, NULL,
/* 50-55 */ "Xdwrite", "Xpwrite, Read disk info", "Xdread, Read track info", /* 50-55 */ "Xdwrite", "Xpwrite, Read disk info", "Xdread, Read track info",
"Reserve track", "Send OPC info", "Mode Select (10)", "Reserve track", "Send OPC info", "Mode Select(10)",
/* 56-5b */ "Reserve (10)", "Release (10)", "Repair track", "Read master cue", /* 56-5b */ "Reserve(10)", "Release(10)", "Repair track", "Read master cue",
"Mode Sense (10)", "Close track/session", "Mode Sense(10)", "Close track/session",
/* 5c-5f */ "Read buffer capacity", "Send cue sheet", "Persistent reserve in", /* 5c-5f */ "Read buffer capacity", "Send cue sheet", "Persistent reserve in",
"Persistent reserve out", "Persistent reserve out",
/* 60-67 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 60-67 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 68-6f */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 68-6f */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 70-77 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 70-77 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 78-7f */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Variable length", /* 78-7f */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Variable length",
/* 80-84 */ "Xdwrite (16)", "Rebuild (16)", "Regenerate (16)", "Extended copy", /* 80-84 */ "Xdwrite(16)", "Rebuild(16)", "Regenerate(16)", "Extended copy",
"Receive copy results", "Receive copy results",
/* 85-89 */ "Memory Export In (16)", "Access control in", "Access control out", /* 85-89 */ "ATA command pass through(16)", "Access control in",
"Read (16)", "Memory Export Out (16)", "Access control out", "Read(16)", "Memory Export Out(16)",
/* 8a-8f */ "Write (16)", NULL, "Read attributes", "Write attributes", /* 8a-8f */ "Write(16)", NULL, "Read attributes", "Write attributes",
"Write and verify (16)", "Verify (16)", "Write and verify(16)", "Verify(16)",
/* 90-94 */ "Pre-fetch (16)", "Synchronize cache (16)", /* 90-94 */ "Pre-fetch(16)", "Synchronize cache(16)",
"Lock/unlock cache (16)", "Write same (16)", NULL, "Lock/unlock cache(16)", "Write same(16)", NULL,
/* 95-99 */ NULL, NULL, NULL, NULL, NULL, /* 95-99 */ NULL, NULL, NULL, NULL, NULL,
/* 9a-9f */ NULL, NULL, NULL, NULL, "Service action in (16)", /* 9a-9f */ NULL, NULL, NULL, NULL, "Service action in(16)",
"Service action out (16)", "Service action out(16)",
/* a0-a5 */ "Report luns", "Blank", "Send event", "Maintenance in", /* a0-a5 */ "Report luns", "ATA command pass through(12)/Blank",
"Maintenance out", "Move medium/play audio(12)", "Security protocol in", "Maintenance in", "Maintenance out",
"Move medium/play audio(12)",
/* a6-a9 */ "Exchange medium", "Move medium attached", "Read(12)", /* a6-a9 */ "Exchange medium", "Move medium attached", "Read(12)",
"Play track relative(12)", "Play track relative(12)",
/* aa-ae */ "Write(12)", NULL, "Erase(12), Get Performance", /* aa-ae */ "Write(12)", NULL, "Erase(12), Get Performance",
@@ -92,12 +94,12 @@ static const char * cdb_byte0_names[] = {
/* af-b1 */ "Verify(12)", "Search data high(12)", "Search data equal(12)", /* af-b1 */ "Verify(12)", "Search data high(12)", "Search data equal(12)",
/* b2-b4 */ "Search data low(12)", "Set limits(12)", /* b2-b4 */ "Search data low(12)", "Set limits(12)",
"Read element status attached", "Read element status attached",
/* b5-b6 */ "Request volume element address", "Send volume tag, set streaming", /* b5-b6 */ "Security protocol out", "Send volume tag, set streaming",
/* b7-b9 */ "Read defect data(12)", "Read element status", "Read CD msf", /* b7-b9 */ "Read defect data(12)", "Read element status", "Read CD msf",
/* ba-bc */ "Redundancy group (in), Scan", /* ba-bc */ "Redundancy group (in), Scan",
"Redundancy group (out), Set cd-rom speed", "Spare in, Play cd", "Redundancy group (out), Set cd-rom speed", "Spare (in), Play cd",
/* bd-bf */ "Spare out, Mechanism status", "Volume set in, Read cd", /* bd-bf */ "Spare (out), Mechanism status", "Volume set (in), Read cd",
"Volume set out, Send DVD structure", "Volume set (out), Send DVD structure",
}; };
struct value_name_pair { struct value_name_pair {
@@ -112,6 +114,7 @@ static const struct value_name_pair maint_in_arr[] = {
{0xc, "Report supported operation codes"}, {0xc, "Report supported operation codes"},
{0xd, "Report supported task management functions"}, {0xd, "Report supported task management functions"},
{0xe, "Report priority"}, {0xe, "Report priority"},
{0xf, "Report timestamp"},
}; };
#define MAINT_IN_SZ ARRAY_SIZE(maint_in_arr) #define MAINT_IN_SZ ARRAY_SIZE(maint_in_arr)
@@ -120,6 +123,7 @@ static const struct value_name_pair maint_out_arr[] = {
{0xa, "Set target port groups"}, {0xa, "Set target port groups"},
{0xb, "Change aliases"}, {0xb, "Change aliases"},
{0xe, "Set priority"}, {0xe, "Set priority"},
{0xe, "Set timestamp"},
}; };
#define MAINT_OUT_SZ ARRAY_SIZE(maint_out_arr) #define MAINT_OUT_SZ ARRAY_SIZE(maint_out_arr)
@@ -427,6 +431,7 @@ static struct error_info additional[] =
{0x001A, "Rewind operation in progress"}, {0x001A, "Rewind operation in progress"},
{0x001B, "Set capacity operation in progress"}, {0x001B, "Set capacity operation in progress"},
{0x001C, "Verify operation in progress"}, {0x001C, "Verify operation in progress"},
{0x001D, "ATA pass through information available"},
{0x0100, "No index/sector signal"}, {0x0100, "No index/sector signal"},
@@ -438,7 +443,7 @@ static struct error_info additional[] =
{0x0400, "Logical unit not ready, cause not reportable"}, {0x0400, "Logical unit not ready, cause not reportable"},
{0x0401, "Logical unit is in process of becoming ready"}, {0x0401, "Logical unit is in process of becoming ready"},
{0x0402, "Logical unit not ready, initializing cmd. required"}, {0x0402, "Logical unit not ready, initializing command required"},
{0x0403, "Logical unit not ready, manual intervention required"}, {0x0403, "Logical unit not ready, manual intervention required"},
{0x0404, "Logical unit not ready, format in progress"}, {0x0404, "Logical unit not ready, format in progress"},
{0x0405, "Logical unit not ready, rebuild in progress"}, {0x0405, "Logical unit not ready, rebuild in progress"},
@@ -478,6 +483,9 @@ static struct error_info additional[] =
{0x0B00, "Warning"}, {0x0B00, "Warning"},
{0x0B01, "Warning - specified temperature exceeded"}, {0x0B01, "Warning - specified temperature exceeded"},
{0x0B02, "Warning - enclosure degraded"}, {0x0B02, "Warning - enclosure degraded"},
{0x0B03, "Warning - background self-test failed"},
{0x0B04, "Warning - background pre-scan detected medium error"},
{0x0B05, "Warning - background medium scan detected medium error"},
{0x0C00, "Write error"}, {0x0C00, "Write error"},
{0x0C01, "Write error - recovered with auto reallocation"}, {0x0C01, "Write error - recovered with auto reallocation"},
@@ -493,6 +501,7 @@ static struct error_info additional[] =
{0x0C0B, "Auxiliary memory write error"}, {0x0C0B, "Auxiliary memory write error"},
{0x0C0C, "Write error - unexpected unsolicited data"}, {0x0C0C, "Write error - unexpected unsolicited data"},
{0x0C0D, "Write error - not enough unsolicited data"}, {0x0C0D, "Write error - not enough unsolicited data"},
{0x0C0F, "Defects in error window"},
{0x0D00, "Error detected by third party temporary initiator"}, {0x0D00, "Error detected by third party temporary initiator"},
{0x0D01, "Third party device failure"}, {0x0D01, "Third party device failure"},
@@ -504,11 +513,12 @@ static struct error_info additional[] =
{0x0E00, "Invalid information unit"}, {0x0E00, "Invalid information unit"},
{0x0E01, "Information unit too short"}, {0x0E01, "Information unit too short"},
{0x0E02, "Information unit too long"}, {0x0E02, "Information unit too long"},
{0x0E03, "Invalid field in command information unit"},
{0x1000, "Id CRC or ECC error"}, {0x1000, "Id CRC or ECC error"},
{0x1001, "Data block guard check failed"}, {0x1001, "Logical block guard check failed"},
{0x1002, "Data block application tag check failed"}, {0x1002, "Logical block application tag check failed"},
{0x1003, "Data block reference tag check failed"}, {0x1003, "Logical block reference tag check failed"},
{0x1100, "Unrecovered read error"}, {0x1100, "Unrecovered read error"},
{0x1101, "Read retries exhausted"}, {0x1101, "Read retries exhausted"},
@@ -530,6 +540,7 @@ static struct error_info additional[] =
{0x1111, "Read error - loss of streaming"}, {0x1111, "Read error - loss of streaming"},
{0x1112, "Auxiliary memory read error"}, {0x1112, "Auxiliary memory read error"},
{0x1113, "Read error - failed retransmission request"}, {0x1113, "Read error - failed retransmission request"},
{0x1114, "Read error - lba marked bad by application client"},
{0x1200, "Address mark not found for id field"}, {0x1200, "Address mark not found for id field"},
@@ -610,11 +621,14 @@ static struct error_info additional[] =
{0x2100, "Logical block address out of range"}, {0x2100, "Logical block address out of range"},
{0x2101, "Invalid element address"}, {0x2101, "Invalid element address"},
{0x2102, "Invalid address for write"}, {0x2102, "Invalid address for write"},
{0x2103, "Invalid write crossing layer jump"},
{0x2200, "Illegal function (use 20 00, 24 00, or 26 00)"}, {0x2200, "Illegal function (use 20 00, 24 00, or 26 00)"},
{0x2400, "Invalid field in cdb"}, {0x2400, "Invalid field in cdb"},
{0x2401, "CDB decryption error"}, {0x2401, "CDB decryption error"},
{0x2402, "Obsolete"},
{0x2403, "Obsolete"},
{0x2404, "Security audit value frozen"}, {0x2404, "Security audit value frozen"},
{0x2405, "Security working key frozen"}, {0x2405, "Security working key frozen"},
{0x2406, "Nonce not unique"}, {0x2406, "Nonce not unique"},
@@ -637,7 +651,10 @@ static struct error_info additional[] =
{0x260C, "Invalid operation for copy source or destination"}, {0x260C, "Invalid operation for copy source or destination"},
{0x260D, "Copy segment granularity violation"}, {0x260D, "Copy segment granularity violation"},
{0x260E, "Invalid parameter while port is enabled"}, {0x260E, "Invalid parameter while port is enabled"},
{0x260F, "Invalid data-out buffer integrity"}, {0x260F, "Invalid data-out buffer integrity check value"},
{0x2610, "Data decryption key fail limit reached"},
{0x2611, "Incomplete key-associated data set"},
{0x2612, "Vendor specific key reference not found"},
{0x2700, "Write protected"}, {0x2700, "Write protected"},
{0x2701, "Hardware write protected"}, {0x2701, "Hardware write protected"},
@@ -649,6 +666,7 @@ static struct error_info additional[] =
{0x2800, "Not ready to ready change, medium may have changed"}, {0x2800, "Not ready to ready change, medium may have changed"},
{0x2801, "Import or export element accessed"}, {0x2801, "Import or export element accessed"},
{0x2802, "Format-layer may have changed"},
{0x2900, "Power on, reset, or bus device reset occurred"}, {0x2900, "Power on, reset, or bus device reset occurred"},
{0x2901, "Power on occurred"}, {0x2901, "Power on occurred"},
@@ -669,6 +687,11 @@ static struct error_info additional[] =
{0x2A07, "Implicit asymmetric access state transition failed"}, {0x2A07, "Implicit asymmetric access state transition failed"},
{0x2A08, "Priority changed"}, {0x2A08, "Priority changed"},
{0x2A09, "Capacity data has changed"}, {0x2A09, "Capacity data has changed"},
{0x2A10, "Timestamp changed"},
{0x2A11, "Data encryption parameters changed by another i_t nexus"},
{0x2A12, "Data encryption parameters changed by vendor specific "
"event"},
{0x2A13, "Data encryption key instance counter has changed"},
{0x2B00, "Copy cannot execute since host cannot disconnect"}, {0x2B00, "Copy cannot execute since host cannot disconnect"},
@@ -690,6 +713,7 @@ static struct error_info additional[] =
{0x2E00, "Insufficient time for operation"}, {0x2E00, "Insufficient time for operation"},
{0x2F00, "Commands cleared by another initiator"}, {0x2F00, "Commands cleared by another initiator"},
{0x2F01, "Commands cleared by power loss notification"},
{0x3000, "Incompatible medium installed"}, {0x3000, "Incompatible medium installed"},
{0x3001, "Cannot read medium - unknown format"}, {0x3001, "Cannot read medium - unknown format"},
@@ -702,7 +726,8 @@ static struct error_info additional[] =
{0x3008, "Cannot write - application code mismatch"}, {0x3008, "Cannot write - application code mismatch"},
{0x3009, "Current session not fixated for append"}, {0x3009, "Current session not fixated for append"},
{0x300A, "Cleaning request rejected"}, {0x300A, "Cleaning request rejected"},
{0x300C, "WORM medium, overwrite attempted"}, {0x300C, "WORM medium - overwrite attempted"},
{0x300D, "WORM medium - integrity check"},
{0x3010, "Medium not formatted"}, {0x3010, "Medium not formatted"},
{0x3100, "Medium format corrupted"}, {0x3100, "Medium format corrupted"},
@@ -790,6 +815,9 @@ static struct error_info additional[] =
{0x3F0F, "Echo buffer overwritten"}, {0x3F0F, "Echo buffer overwritten"},
{0x3F10, "Medium loadable"}, {0x3F10, "Medium loadable"},
{0x3F11, "Medium auxiliary memory accessible"}, {0x3F11, "Medium auxiliary memory accessible"},
{0x3F12, "iSCSI IP address added"},
{0x3F13, "iSCSI IP address removed"},
{0x3F14, "iSCSI IP address changed"},
/* /*
* {0x40NN, "Ram failure"}, * {0x40NN, "Ram failure"},
* {0x40NN, "Diagnostic failure on component nn"}, * {0x40NN, "Diagnostic failure on component nn"},
@@ -799,6 +827,7 @@ static struct error_info additional[] =
{0x4300, "Message error"}, {0x4300, "Message error"},
{0x4400, "Internal target failure"}, {0x4400, "Internal target failure"},
{0x4471, "ATA device failed set features"},
{0x4500, "Select or reselect failure"}, {0x4500, "Select or reselect failure"},
@@ -807,9 +836,10 @@ static struct error_info additional[] =
{0x4700, "Scsi parity error"}, {0x4700, "Scsi parity error"},
{0x4701, "Data phase CRC error detected"}, {0x4701, "Data phase CRC error detected"},
{0x4702, "Scsi parity error detected during st data phase"}, {0x4702, "Scsi parity error detected during st data phase"},
{0x4703, "Information unit CRC error detected"}, {0x4703, "Information unit iuCRC error detected"},
{0x4704, "Asynchronous information protection error detected"}, {0x4704, "Asynchronous information protection error detected"},
{0x4705, "Protocol service CRC error"}, {0x4705, "Protocol service CRC error"},
{0x4706, "Phy test function in progress"},
{0x477f, "Some commands cleared by iSCSI Protocol event"}, {0x477f, "Some commands cleared by iSCSI Protocol event"},
{0x4800, "Initiator detected error message received"}, {0x4800, "Initiator detected error message received"},
@@ -844,6 +874,8 @@ static struct error_info additional[] =
{0x5300, "Media load or eject failed"}, {0x5300, "Media load or eject failed"},
{0x5301, "Unload tape failure"}, {0x5301, "Unload tape failure"},
{0x5302, "Medium removal prevented"}, {0x5302, "Medium removal prevented"},
{0x5303, "Medium removal prevented by data transfer element"},
{0x5304, "Medium thread or unthread failure"},
{0x5400, "Scsi to host system interface failure"}, {0x5400, "Scsi to host system interface failure"},
@@ -855,6 +887,7 @@ static struct error_info additional[] =
{0x5505, "Insufficient access control resources"}, {0x5505, "Insufficient access control resources"},
{0x5506, "Auxiliary memory out of space"}, {0x5506, "Auxiliary memory out of space"},
{0x5507, "Quota error"}, {0x5507, "Quota error"},
{0x5508, "Maximum number of supplemental decryption keys exceeded"},
{0x5700, "Unable to recover table-of-contents"}, {0x5700, "Unable to recover table-of-contents"},
@@ -1004,6 +1037,7 @@ static struct error_info additional[] =
{0x6708, "Assign failure occurred"}, {0x6708, "Assign failure occurred"},
{0x6709, "Multiply assigned logical unit"}, {0x6709, "Multiply assigned logical unit"},
{0x670A, "Set target port groups command failed"}, {0x670A, "Set target port groups command failed"},
{0x670B, "ATA device feature not enabled"},
{0x6800, "Logical unit not configured"}, {0x6800, "Logical unit not configured"},
@@ -1030,6 +1064,8 @@ static struct error_info additional[] =
{0x6F03, "Read of scrambled sector without authentication"}, {0x6F03, "Read of scrambled sector without authentication"},
{0x6F04, "Media region code is mismatched to logical unit region"}, {0x6F04, "Media region code is mismatched to logical unit region"},
{0x6F05, "Drive region must be permanent/region reset count error"}, {0x6F05, "Drive region must be permanent/region reset count error"},
{0x6F06, "Insufficient block count for binding nonce recording"},
{0x6F07, "Conflict in binding nonce recording"},
/* /*
* {0x70NN, "Decompression exception short algorithm id of nn"}, * {0x70NN, "Decompression exception short algorithm id of nn"},
*/ */
@@ -1041,6 +1077,8 @@ static struct error_info additional[] =
{0x7203, "Session fixation error - incomplete track in session"}, {0x7203, "Session fixation error - incomplete track in session"},
{0x7204, "Empty or partially written reserved track"}, {0x7204, "Empty or partially written reserved track"},
{0x7205, "No more track reservations allowed"}, {0x7205, "No more track reservations allowed"},
{0x7206, "RMZ extension is not allowed"},
{0x7207, "No more test zone extensions are allowed"},
{0x7300, "Cd control error"}, {0x7300, "Cd control error"},
{0x7301, "Power calibration area almost full"}, {0x7301, "Power calibration area almost full"},
@@ -1049,6 +1087,18 @@ static struct error_info additional[] =
{0x7304, "Program memory area update failure"}, {0x7304, "Program memory area update failure"},
{0x7305, "Program memory area is full"}, {0x7305, "Program memory area is full"},
{0x7306, "RMA/PMA is almost full"}, {0x7306, "RMA/PMA is almost full"},
{0x7310, "Current power calibration area almost full"},
{0x7311, "Current power calibration area is full"},
{0x7317, "RDZ is full"},
{0x7400, "Security error"},
{0x7401, "Unable to decrypt data"},
{0x7402, "Unencrypted data encountered while decrypting"},
{0x7403, "Incorrect data encryption key"},
{0x7404, "Cryptographic integrity validation failed"},
{0x7405, "Error decrypting data"},
{0x7471, "Logical unit access not authorized"},
{0, NULL} {0, NULL}
}; };

Some files were not shown because too many files have changed in this diff Show More