diff options
Diffstat (limited to 'drivers/message')
| -rw-r--r-- | drivers/message/fusion/lsi/mpi_history.txt | 6 | ||||
| -rw-r--r-- | drivers/message/fusion/mptbase.c | 1570 | ||||
| -rw-r--r-- | drivers/message/fusion/mptbase.h | 180 | ||||
| -rw-r--r-- | drivers/message/fusion/mptctl.c | 692 | ||||
| -rw-r--r-- | drivers/message/fusion/mptdebug.h | 3 | ||||
| -rw-r--r-- | drivers/message/fusion/mptfc.c | 15 | ||||
| -rw-r--r-- | drivers/message/fusion/mptsas.c | 3114 | ||||
| -rw-r--r-- | drivers/message/fusion/mptsas.h | 41 | ||||
| -rw-r--r-- | drivers/message/fusion/mptscsih.c | 1329 | ||||
| -rw-r--r-- | drivers/message/fusion/mptscsih.h | 7 | ||||
| -rw-r--r-- | drivers/message/fusion/mptspi.c | 71 |
11 files changed, 4571 insertions, 2457 deletions
diff --git a/drivers/message/fusion/lsi/mpi_history.txt b/drivers/message/fusion/lsi/mpi_history.txt index 693e4b511354..fa9249b4971a 100644 --- a/drivers/message/fusion/lsi/mpi_history.txt +++ b/drivers/message/fusion/lsi/mpi_history.txt | |||
| @@ -130,7 +130,7 @@ mpi_ioc.h | |||
| 130 | * 08-08-01 01.02.01 Original release for v1.2 work. | 130 | * 08-08-01 01.02.01 Original release for v1.2 work. |
| 131 | * New format for FWVersion and ProductId in | 131 | * New format for FWVersion and ProductId in |
| 132 | * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER. | 132 | * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER. |
| 133 | * 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and | 133 | * 08-31-01 01.02.02 Added event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and |
| 134 | * related structure and defines. | 134 | * related structure and defines. |
| 135 | * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED. | 135 | * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED. |
| 136 | * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE. | 136 | * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE. |
| @@ -190,7 +190,7 @@ mpi_ioc.h | |||
| 190 | * 10-11-06 01.05.12 Added MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED. | 190 | * 10-11-06 01.05.12 Added MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED. |
| 191 | * Added MaxInitiators field to PortFacts reply. | 191 | * Added MaxInitiators field to PortFacts reply. |
| 192 | * Added SAS Device Status Change ReasonCode for | 192 | * Added SAS Device Status Change ReasonCode for |
| 193 | * asynchronous notificaiton. | 193 | * asynchronous notification. |
| 194 | * Added MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE and event | 194 | * Added MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE and event |
| 195 | * data structure. | 195 | * data structure. |
| 196 | * Added new ImageType values for FWDownload and FWUpload | 196 | * Added new ImageType values for FWDownload and FWUpload |
| @@ -623,7 +623,7 @@ mpi_fc.h | |||
| 623 | * 11-02-00 01.01.01 Original release for post 1.0 work | 623 | * 11-02-00 01.01.01 Original release for post 1.0 work |
| 624 | * 12-04-00 01.01.02 Added messages for Common Transport Send and | 624 | * 12-04-00 01.01.02 Added messages for Common Transport Send and |
| 625 | * Primitive Send. | 625 | * Primitive Send. |
| 626 | * 01-09-01 01.01.03 Modifed some of the new flags to have an MPI prefix | 626 | * 01-09-01 01.01.03 Modified some of the new flags to have an MPI prefix |
| 627 | * and modified the FcPrimitiveSend flags. | 627 | * and modified the FcPrimitiveSend flags. |
| 628 | * 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger | 628 | * 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger |
| 629 | * field. | 629 | * field. |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 5d496a99e034..0df065275cd3 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
| @@ -146,7 +146,6 @@ static MPT_EVHANDLER MptEvHandlers[MPT_MAX_PROTOCOL_DRIVERS]; | |||
| 146 | static MPT_RESETHANDLER MptResetHandlers[MPT_MAX_PROTOCOL_DRIVERS]; | 146 | static MPT_RESETHANDLER MptResetHandlers[MPT_MAX_PROTOCOL_DRIVERS]; |
| 147 | static struct mpt_pci_driver *MptDeviceDriverHandlers[MPT_MAX_PROTOCOL_DRIVERS]; | 147 | static struct mpt_pci_driver *MptDeviceDriverHandlers[MPT_MAX_PROTOCOL_DRIVERS]; |
| 148 | 148 | ||
| 149 | static DECLARE_WAIT_QUEUE_HEAD(mpt_waitq); | ||
| 150 | 149 | ||
| 151 | /* | 150 | /* |
| 152 | * Driver Callback Index's | 151 | * Driver Callback Index's |
| @@ -159,7 +158,8 @@ static u8 last_drv_idx; | |||
| 159 | * Forward protos... | 158 | * Forward protos... |
| 160 | */ | 159 | */ |
| 161 | static irqreturn_t mpt_interrupt(int irq, void *bus_id); | 160 | static irqreturn_t mpt_interrupt(int irq, void *bus_id); |
| 162 | static int mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply); | 161 | static int mptbase_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, |
| 162 | MPT_FRAME_HDR *reply); | ||
| 163 | static int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, | 163 | static int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, |
| 164 | u32 *req, int replyBytes, u16 *u16reply, int maxwait, | 164 | u32 *req, int replyBytes, u16 *u16reply, int maxwait, |
| 165 | int sleepFlag); | 165 | int sleepFlag); |
| @@ -190,9 +190,9 @@ static int mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum); | |||
| 190 | static int mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum); | 190 | static int mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum); |
| 191 | static void mpt_read_ioc_pg_1(MPT_ADAPTER *ioc); | 191 | static void mpt_read_ioc_pg_1(MPT_ADAPTER *ioc); |
| 192 | static void mpt_read_ioc_pg_4(MPT_ADAPTER *ioc); | 192 | static void mpt_read_ioc_pg_4(MPT_ADAPTER *ioc); |
| 193 | static void mpt_timer_expired(unsigned long data); | ||
| 194 | static void mpt_get_manufacturing_pg_0(MPT_ADAPTER *ioc); | 193 | static void mpt_get_manufacturing_pg_0(MPT_ADAPTER *ioc); |
| 195 | static int SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch); | 194 | static int SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, |
| 195 | int sleepFlag); | ||
| 196 | static int SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp); | 196 | static int SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp); |
| 197 | static int mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag); | 197 | static int mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag); |
| 198 | static int mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init); | 198 | static int mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init); |
| @@ -207,8 +207,8 @@ static int procmpt_iocinfo_read(char *buf, char **start, off_t offset, | |||
| 207 | #endif | 207 | #endif |
| 208 | static void mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc); | 208 | static void mpt_get_fw_exp_ver(char *buf, MPT_ADAPTER *ioc); |
| 209 | 209 | ||
| 210 | //int mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag); | 210 | static int ProcessEventNotification(MPT_ADAPTER *ioc, |
| 211 | static int ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *evReply, int *evHandlers); | 211 | EventNotificationReply_t *evReply, int *evHandlers); |
| 212 | static void mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf); | 212 | static void mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf); |
| 213 | static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info); | 213 | static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info); |
| 214 | static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info); | 214 | static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info); |
| @@ -277,6 +277,56 @@ mpt_get_cb_idx(MPT_DRIVER_CLASS dclass) | |||
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | /** | 279 | /** |
| 280 | * mpt_is_discovery_complete - determine if discovery has completed | ||
| 281 | * @ioc: per adatper instance | ||
| 282 | * | ||
| 283 | * Returns 1 when discovery completed, else zero. | ||
| 284 | */ | ||
| 285 | static int | ||
| 286 | mpt_is_discovery_complete(MPT_ADAPTER *ioc) | ||
| 287 | { | ||
| 288 | ConfigExtendedPageHeader_t hdr; | ||
| 289 | CONFIGPARMS cfg; | ||
| 290 | SasIOUnitPage0_t *buffer; | ||
| 291 | dma_addr_t dma_handle; | ||
| 292 | int rc = 0; | ||
| 293 | |||
| 294 | memset(&hdr, 0, sizeof(ConfigExtendedPageHeader_t)); | ||
| 295 | memset(&cfg, 0, sizeof(CONFIGPARMS)); | ||
| 296 | hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION; | ||
| 297 | hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; | ||
| 298 | hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT; | ||
| 299 | cfg.cfghdr.ehdr = &hdr; | ||
| 300 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | ||
| 301 | |||
| 302 | if ((mpt_config(ioc, &cfg))) | ||
| 303 | goto out; | ||
| 304 | if (!hdr.ExtPageLength) | ||
| 305 | goto out; | ||
| 306 | |||
| 307 | buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4, | ||
| 308 | &dma_handle); | ||
| 309 | if (!buffer) | ||
| 310 | goto out; | ||
| 311 | |||
| 312 | cfg.physAddr = dma_handle; | ||
| 313 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; | ||
| 314 | |||
| 315 | if ((mpt_config(ioc, &cfg))) | ||
| 316 | goto out_free_consistent; | ||
| 317 | |||
| 318 | if (!(buffer->PhyData[0].PortFlags & | ||
| 319 | MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS)) | ||
| 320 | rc = 1; | ||
| 321 | |||
| 322 | out_free_consistent: | ||
| 323 | pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, | ||
| 324 | buffer, dma_handle); | ||
| 325 | out: | ||
| 326 | return rc; | ||
| 327 | } | ||
| 328 | |||
| 329 | /** | ||
| 280 | * mpt_fault_reset_work - work performed on workq after ioc fault | 330 | * mpt_fault_reset_work - work performed on workq after ioc fault |
| 281 | * @work: input argument, used to derive ioc | 331 | * @work: input argument, used to derive ioc |
| 282 | * | 332 | * |
| @@ -290,7 +340,7 @@ mpt_fault_reset_work(struct work_struct *work) | |||
| 290 | int rc; | 340 | int rc; |
| 291 | unsigned long flags; | 341 | unsigned long flags; |
| 292 | 342 | ||
| 293 | if (ioc->diagPending || !ioc->active) | 343 | if (ioc->ioc_reset_in_progress || !ioc->active) |
| 294 | goto out; | 344 | goto out; |
| 295 | 345 | ||
| 296 | ioc_raw_state = mpt_GetIocState(ioc, 0); | 346 | ioc_raw_state = mpt_GetIocState(ioc, 0); |
| @@ -307,6 +357,12 @@ mpt_fault_reset_work(struct work_struct *work) | |||
| 307 | printk(MYIOC_s_WARN_FMT "IOC is in FAULT state after " | 357 | printk(MYIOC_s_WARN_FMT "IOC is in FAULT state after " |
| 308 | "reset (%04xh)\n", ioc->name, ioc_raw_state & | 358 | "reset (%04xh)\n", ioc->name, ioc_raw_state & |
| 309 | MPI_DOORBELL_DATA_MASK); | 359 | MPI_DOORBELL_DATA_MASK); |
| 360 | } else if (ioc->bus_type == SAS && ioc->sas_discovery_quiesce_io) { | ||
| 361 | if ((mpt_is_discovery_comp | ||
