diff options
Diffstat (limited to 'drivers/message')
-rw-r--r-- | drivers/message/fusion/mptbase.h | 4 | ||||
-rw-r--r-- | drivers/message/fusion/mptctl.c | 5 | ||||
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 95 | ||||
-rw-r--r-- | drivers/message/fusion/mptscsih.h | 3 |
4 files changed, 93 insertions, 14 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 8dd4d219e433..b4948671eb92 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -76,8 +76,8 @@ | |||
76 | #define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR | 76 | #define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #define MPT_LINUX_VERSION_COMMON "3.04.12" | 79 | #define MPT_LINUX_VERSION_COMMON "3.04.13" |
80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.12" | 80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.13" |
81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" | 81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" |
82 | 82 | ||
83 | #define show_mptmod_ver(s,ver) \ | 83 | #define show_mptmod_ver(s,ver) \ |
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 9b2e2198aee9..352acd05c46b 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -621,11 +621,8 @@ __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
621 | */ | 621 | */ |
622 | iocnumX = khdr.iocnum & 0xFF; | 622 | iocnumX = khdr.iocnum & 0xFF; |
623 | if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || | 623 | if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || |
624 | (iocp == NULL)) { | 624 | (iocp == NULL)) |
625 | printk(KERN_DEBUG MYNAM "%s::mptctl_ioctl() @%d - ioc%d not found!\n", | ||
626 | __FILE__, __LINE__, iocnumX); | ||
627 | return -ENODEV; | 625 | return -ENODEV; |
628 | } | ||
629 | 626 | ||
630 | if (!iocp->active) { | 627 | if (!iocp->active) { |
631 | printk(KERN_DEBUG MYNAM "%s::mptctl_ioctl() @%d - Controller disabled.\n", | 628 | printk(KERN_DEBUG MYNAM "%s::mptctl_ioctl() @%d - Controller disabled.\n", |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index c29578614504..57752751712b 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -792,11 +792,36 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
792 | * precedence! | 792 | * precedence! |
793 | */ | 793 | */ |
794 | sc->result = (DID_OK << 16) | scsi_status; | 794 | sc->result = (DID_OK << 16) | scsi_status; |
795 | if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) { | 795 | if (!(scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID)) { |
796 | /* Have already saved the status and sense data | 796 | |
797 | /* | ||
798 | * For an Errata on LSI53C1030 | ||
799 | * When the length of request data | ||
800 | * and transfer data are different | ||
801 | * with result of command (READ or VERIFY), | ||
802 | * DID_SOFT_ERROR is set. | ||
797 | */ | 803 | */ |
798 | ; | 804 | if (ioc->bus_type == SPI) { |
799 | } else { | 805 | if (pScsiReq->CDB[0] == READ_6 || |
806 | pScsiReq->CDB[0] == READ_10 || | ||
807 | pScsiReq->CDB[0] == READ_12 || | ||
808 | pScsiReq->CDB[0] == READ_16 || | ||
809 | pScsiReq->CDB[0] == VERIFY || | ||
810 | pScsiReq->CDB[0] == VERIFY_16) { | ||
811 | if (scsi_bufflen(sc) != | ||
812 | xfer_cnt) { | ||
813 | sc->result = | ||
814 | DID_SOFT_ERROR << 16; | ||
815 | printk(KERN_WARNING "Errata" | ||
816 | "on LSI53C1030 occurred." | ||
817 | "sc->req_bufflen=0x%02x," | ||
818 | "xfer_cnt=0x%02x\n", | ||
819 | scsi_bufflen(sc), | ||
820 | xfer_cnt); | ||
821 | } | ||
822 | } | ||
823 | } | ||
824 | |||
800 | if (xfer_cnt < sc->underflow) { | 825 | if (xfer_cnt < sc->underflow) { |
801 | if (scsi_status == SAM_STAT_BUSY) | 826 | if (scsi_status == SAM_STAT_BUSY) |
802 | sc->result = SAM_STAT_BUSY; | 827 | sc->result = SAM_STAT_BUSY; |
@@ -835,7 +860,58 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
835 | sc->result = (DID_OK << 16) | scsi_status; | 860 | sc->result = (DID_OK << 16) | scsi_status; |
836 | if (scsi_state == 0) { | 861 | if (scsi_state == 0) { |
837 | ; | 862 | ; |
838 | } else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) { | 863 | } else if (scsi_state & |
864 | MPI_SCSI_STATE_AUTOSENSE_VALID) { | ||
865 | |||
866 | /* | ||
867 | * For potential trouble on LSI53C1030. | ||
868 | * (date:2007.xx.) | ||
869 | * It is checked whether the length of | ||
870 | * request data is equal to | ||
871 | * the length of transfer and residual. | ||
872 | * MEDIUM_ERROR is set by incorrect data. | ||
873 | */ | ||
874 | if ((ioc->bus_type == SPI) && | ||
875 | (sc->sense_buffer[2] & 0x20)) { | ||
876 | u32 difftransfer; | ||
877 | difftransfer = | ||
878 | sc->sense_buffer[3] << 24 | | ||
879 | sc->sense_buffer[4] << 16 | | ||
880 | sc->sense_buffer[5] << 8 | | ||
881 | sc->sense_buffer[6]; | ||
882 | if (((sc->sense_buffer[3] & 0x80) == | ||
883 | 0x80) && (scsi_bufflen(sc) | ||
884 | != xfer_cnt)) { | ||
885 | sc->sense_buffer[2] = | ||
886 | MEDIUM_ERROR; | ||
887 | sc->sense_buffer[12] = 0xff; | ||
888 | sc->sense_buffer[13] = 0xff; | ||
889 | printk(KERN_WARNING"Errata" | ||
890 | "on LSI53C1030 occurred." | ||
891 | "sc->req_bufflen=0x%02x," | ||
892 | "xfer_cnt=0x%02x\n" , | ||
893 | scsi_bufflen(sc), | ||
894 | xfer_cnt); | ||
895 | } | ||
896 | if (((sc->sense_buffer[3] & 0x80) | ||
897 | != 0x80) && | ||
898 | (scsi_bufflen(sc) != | ||
899 | xfer_cnt + difftransfer)) { | ||
900 | sc->sense_buffer[2] = | ||
901 | MEDIUM_ERROR; | ||
902 | sc->sense_buffer[12] = 0xff; | ||
903 | sc->sense_buffer[13] = 0xff; | ||
904 | printk(KERN_WARNING | ||
905 | "Errata on LSI53C1030 occurred" | ||
906 | "sc->req_bufflen=0x%02x," | ||
907 | " xfer_cnt=0x%02x," | ||
908 | "difftransfer=0x%02x\n", | ||
909 | scsi_bufflen(sc), | ||
910 | xfer_cnt, | ||
911 | difftransfer); | ||
912 | } | ||
913 | } | ||
914 | |||
839 | /* | 915 | /* |
840 | * If running against circa 200003dd 909 MPT f/w, | 916 | * If running against circa 200003dd 909 MPT f/w, |
841 | * may get this (AUTOSENSE_VALID) for actual TASK_SET_FULL | 917 | * may get this (AUTOSENSE_VALID) for actual TASK_SET_FULL |
@@ -2275,11 +2351,12 @@ mptscsih_slave_destroy(struct scsi_device *sdev) | |||
2275 | * mptscsih_change_queue_depth - This function will set a devices queue depth | 2351 | * mptscsih_change_queue_depth - This function will set a devices queue depth |
2276 | * @sdev: per scsi_device pointer | 2352 | * @sdev: per scsi_device pointer |
2277 | * @qdepth: requested queue depth | 2353 | * @qdepth: requested queue depth |
2354 | * @reason: calling context | ||
2278 | * | 2355 | * |
2279 | * Adding support for new 'change_queue_depth' api. | 2356 | * Adding support for new 'change_queue_depth' api. |
2280 | */ | 2357 | */ |
2281 | int | 2358 | int |
2282 | mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) | 2359 | mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) |
2283 | { | 2360 | { |
2284 | MPT_SCSI_HOST *hd = shost_priv(sdev->host); | 2361 | MPT_SCSI_HOST *hd = shost_priv(sdev->host); |
2285 | VirtTarget *vtarget; | 2362 | VirtTarget *vtarget; |
@@ -2291,6 +2368,9 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) | |||
2291 | starget = scsi_target(sdev); | 2368 | starget = scsi_target(sdev); |
2292 | vtarget = starget->hostdata; | 2369 | vtarget = starget->hostdata; |
2293 | 2370 | ||
2371 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
2372 | return -EOPNOTSUPP; | ||
2373 | |||
2294 | if (ioc->bus_type == SPI) { | 2374 | if (ioc->bus_type == SPI) { |
2295 | if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)) | 2375 | if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)) |
2296 | max_depth = 1; | 2376 | max_depth = 1; |
@@ -2357,7 +2437,8 @@ mptscsih_slave_configure(struct scsi_device *sdev) | |||
2357 | ioc->name, vtarget->negoFlags, vtarget->maxOffset, | 2437 | ioc->name, vtarget->negoFlags, vtarget->maxOffset, |
2358 | vtarget->minSyncFactor)); | 2438 | vtarget->minSyncFactor)); |
2359 | 2439 | ||
2360 | mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH); | 2440 | mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH, |
2441 | SCSI_QDEPTH_DEFAULT); | ||
2361 | dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 2442 | dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
2362 | "tagged %d, simple %d, ordered %d\n", | 2443 | "tagged %d, simple %d, ordered %d\n", |
2363 | ioc->name,sdev->tagged_supported, sdev->simple_tags, | 2444 | ioc->name,sdev->tagged_supported, sdev->simple_tags, |
diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h index e0b33e04a33b..45a5ff3eff61 100644 --- a/drivers/message/fusion/mptscsih.h +++ b/drivers/message/fusion/mptscsih.h | |||
@@ -128,7 +128,8 @@ extern int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_F | |||
128 | extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); | 128 | extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); |
129 | extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); | 129 | extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); |
130 | extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); | 130 | extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); |
131 | extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth); | 131 | extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, |
132 | int reason); | ||
132 | extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id); | 133 | extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id); |
133 | extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id); | 134 | extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id); |
134 | extern struct device_attribute *mptscsih_host_attrs[]; | 135 | extern struct device_attribute *mptscsih_host_attrs[]; |