···11+1 Release Date : Wed Feb 03 14:31:44 PST 2006 - Sumant Patro <Sumant.Patro@lsil.com>22+2 Current Version : 00.00.02.0433+3 Older Version : 00.00.02.04 44+55+i. Support for 1078 type (ppc IOP) controller, device id : 0x60 added.66+ During initialization, depending on the device id, the template members 77+ are initialized with function pointers specific to the ppc or 88+ xscale controllers. 99+1010+ -Sumant Patro <Sumant.Patro@lsil.com>1111+1212+1 Release Date : Fri Feb 03 14:16:25 PST 2006 - Sumant Patro 1313+ <Sumant.Patro@lsil.com>1414+2 Current Version : 00.00.02.041515+3 Older Version : 00.00.02.02 1616+i. Register 16 byte CDB capability with scsi midlayer 1717+1818+ "Ths patch properly registers the 16 byte command length capability of the 1919+ megaraid_sas controlled hardware with the scsi midlayer. All megaraid_sas 2020+ hardware supports 16 byte CDB's."2121+2222+ -Joshua Giles <joshua_giles@dell.com> 2323+1241 Release Date : Mon Jan 23 14:09:01 PST 2006 - Sumant Patro <Sumant.Patro@lsil.com>2252 Current Version : 00.00.02.023263 Older Version : 00.00.02.01
+2-113
drivers/message/fusion/mptbase.c
···452452 } else if (func == MPI_FUNCTION_EVENT_ACK) {453453 dprintk((MYIOC_s_INFO_FMT "mpt_base_reply, EventAck reply received\n",454454 ioc->name));455455- } else if (func == MPI_FUNCTION_CONFIG ||456456- func == MPI_FUNCTION_TOOLBOX) {455455+ } else if (func == MPI_FUNCTION_CONFIG) {457456 CONFIGPARMS *pCfg;458457 unsigned long flags;459458···53265327}5327532853285329/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/53295329-/**53305330- * mpt_toolbox - Generic function to issue toolbox message53315331- * @ioc - Pointer to an adapter structure53325332- * @cfg - Pointer to a toolbox structure. Struct contains53335333- * action, page address, direction, physical address53345334- * and pointer to a configuration page header53355335- * Page header is updated.53365336- *53375337- * Returns 0 for success53385338- * -EPERM if not allowed due to ISR context53395339- * -EAGAIN if no msg frames currently available53405340- * -EFAULT for non-successful reply or no reply (timeout)53415341- */53425342-int53435343-mpt_toolbox(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg)53445344-{53455345- ToolboxIstwiReadWriteRequest_t *pReq;53465346- MPT_FRAME_HDR *mf;53475347- struct pci_dev *pdev;53485348- unsigned long flags;53495349- int rc;53505350- u32 flagsLength;53515351- int in_isr;53525352-53535353- /* Prevent calling wait_event() (below), if caller happens53545354- * to be in ISR context, because that is fatal!53555355- */53565356- in_isr = in_interrupt();53575357- if (in_isr) {53585358- dcprintk((MYIOC_s_WARN_FMT "toobox request not allowed in ISR context!\n",53595359- ioc->name));53605360- return -EPERM;53615361- }53625362-53635363- /* Get and Populate a free Frame53645364- */53655365- if ((mf = mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) {53665366- dcprintk((MYIOC_s_WARN_FMT "mpt_toolbox: no msg frames!\n",53675367- ioc->name));53685368- return -EAGAIN;53695369- }53705370- pReq = (ToolboxIstwiReadWriteRequest_t *)mf;53715371- pReq->Tool = pCfg->action;53725372- pReq->Reserved = 0;53735373- pReq->ChainOffset = 0;53745374- pReq->Function = MPI_FUNCTION_TOOLBOX;53755375- pReq->Reserved1 = 0;53765376- pReq->Reserved2 = 0;53775377- pReq->MsgFlags = 0;53785378- pReq->Flags = pCfg->dir;53795379- pReq->BusNum = 0;53805380- pReq->Reserved3 = 0;53815381- pReq->NumAddressBytes = 0x01;53825382- pReq->Reserved4 = 0;53835383- pReq->DataLength = cpu_to_le16(0x04);53845384- pdev = ioc->pcidev;53855385- if (pdev->devfn & 1)53865386- pReq->DeviceAddr = 0xB2;53875387- else53885388- pReq->DeviceAddr = 0xB0;53895389- pReq->Addr1 = 0;53905390- pReq->Addr2 = 0;53915391- pReq->Addr3 = 0;53925392- pReq->Reserved5 = 0;53935393-53945394- /* Add a SGE to the config request.53955395- */53965396-53975397- flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ | 4;53985398-53995399- mpt_add_sge((char *)&pReq->SGL, flagsLength, pCfg->physAddr);54005400-54015401- dcprintk((MYIOC_s_INFO_FMT "Sending Toolbox request, Tool=%x\n",54025402- ioc->name, pReq->Tool));54035403-54045404- /* Append pCfg pointer to end of mf54055405- */54065406- *((void **) (((u8 *) mf) + (ioc->req_sz - sizeof(void *)))) = (void *) pCfg;54075407-54085408- /* Initalize the timer54095409- */54105410- init_timer(&pCfg->timer);54115411- pCfg->timer.data = (unsigned long) ioc;54125412- pCfg->timer.function = mpt_timer_expired;54135413- pCfg->wait_done = 0;54145414-54155415- /* Set the timer; ensure 10 second minimum */54165416- if (pCfg->timeout < 10)54175417- pCfg->timer.expires = jiffies + HZ*10;54185418- else54195419- pCfg->timer.expires = jiffies + HZ*pCfg->timeout;54205420-54215421- /* Add to end of Q, set timer and then issue this command */54225422- spin_lock_irqsave(&ioc->FreeQlock, flags);54235423- list_add_tail(&pCfg->linkage, &ioc->configQ);54245424- spin_unlock_irqrestore(&ioc->FreeQlock, flags);54255425-54265426- add_timer(&pCfg->timer);54275427- mpt_put_msg_frame(mpt_base_index, ioc, mf);54285428- wait_event(mpt_waitq, pCfg->wait_done);54295429-54305430- /* mf has been freed - do not access */54315431-54325432- rc = pCfg->status;54335433-54345434- return rc;54355435-}54365436-54375437-/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/54385330/*54395331 * mpt_timer_expired - Call back for timer process.54405332 * Used only internal config functionality.···60326142 if (ioc->events && (ioc->eventTypes & ( 1 << event))) {60336143 int idx;6034614460356035- idx = ioc->eventContext % ioc->eventLogSize;61456145+ idx = ioc->eventContext % MPTCTL_EVENT_LOG_SIZE;6036614660376147 ioc->events[idx].event = event;60386148 ioc->events[idx].eventContext = ioc->eventContext;···64306540EXPORT_SYMBOL(mpt_stm_index);64316541EXPORT_SYMBOL(mpt_HardResetHandler);64326542EXPORT_SYMBOL(mpt_config);64336433-EXPORT_SYMBOL(mpt_toolbox);64346543EXPORT_SYMBOL(mpt_findImVolumes);64356544EXPORT_SYMBOL(mpt_read_ioc_pg_3);64366545EXPORT_SYMBOL(mpt_alloc_fw_memory);
+1-1
drivers/message/fusion/mptbase.h
···616616 * increments by 32 bytes617617 */618618 int errata_flag_1064;619619+ int aen_event_read_flag; /* flag to indicate event log was read*/619620 u8 FirstWhoInit;620621 u8 upload_fw; /* If set, do a fw upload */621622 u8 reload_fw; /* Force a FW Reload on next reset */···10271026extern void mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buf, int *size, int len, int showlan);10281027extern int mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag);10291028extern int mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *cfg);10301030-extern int mpt_toolbox(MPT_ADAPTER *ioc, CONFIGPARMS *cfg);10311029extern void mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size);10321030extern void mpt_free_fw_memory(MPT_ADAPTER *ioc);10331031extern int mpt_findImVolumes(MPT_ADAPTER *ioc);
+201-42
drivers/message/fusion/mptctl.c
···136136 */137137static int mptctl_ioc_reset(MPT_ADAPTER *ioc, int reset_phase);138138139139+/*140140+ * Event Handler function141141+ */142142+static int mptctl_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);143143+struct fasync_struct *async_queue=NULL;144144+139145/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/140146/*141147 * Scatter gather list (SGL) sizes and limits...···391385 }392386393387 /* Now wait for the command to complete */394394- ii = wait_event_interruptible_timeout(mptctl_wait,388388+ ii = wait_event_timeout(mptctl_wait,395389 ioctl->wait_done == 1,396390 HZ*5 /* 5 second timeout */);397391398392 if(ii <=0 && (ioctl->wait_done != 1 )) {393393+ mpt_free_msg_frame(hd->ioc, mf);399394 ioctl->wait_done = 0;400395 retval = -1; /* return failure */401396 }402397403398mptctl_bus_reset_done:404399405405- mpt_free_msg_frame(hd->ioc, mf);406400 mptctl_free_tm_flags(ioctl->ioc);407401 return retval;408402}···475469 }476470477471 return 1;472472+}473473+474474+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/475475+/* ASYNC Event Notification Support */476476+static int477477+mptctl_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)478478+{479479+ u8 event;480480+481481+ event = le32_to_cpu(pEvReply->Event) & 0xFF;482482+483483+ dctlprintk(("%s() called\n", __FUNCTION__));484484+ if(async_queue == NULL)485485+ return 1;486486+487487+ /* Raise SIGIO for persistent events.488488+ * TODO - this define is not in MPI spec yet,489489+ * but they plan to set it to 0x21490490+ */491491+ if (event == 0x21 ) {492492+ ioc->aen_event_read_flag=1;493493+ dctlprintk(("Raised SIGIO to application\n"));494494+ devtprintk(("Raised SIGIO to application\n"));495495+ kill_fasync(&async_queue, SIGIO, POLL_IN);496496+ return 1;497497+ }498498+499499+ /* This flag is set after SIGIO was raised, and500500+ * remains set until the application has read501501+ * the event log via ioctl=MPTEVENTREPORT502502+ */503503+ if(ioc->aen_event_read_flag)504504+ return 1;505505+506506+ /* Signal only for the events that are507507+ * requested for by the application508508+ */509509+ if (ioc->events && (ioc->eventTypes & ( 1 << event))) {510510+ ioc->aen_event_read_flag=1;511511+ dctlprintk(("Raised SIGIO to application\n"));512512+ devtprintk(("Raised SIGIO to application\n"));513513+ kill_fasync(&async_queue, SIGIO, POLL_IN);514514+ }515515+ return 1;516516+}517517+518518+static int519519+mptctl_fasync(int fd, struct file *filep, int mode)520520+{521521+ MPT_ADAPTER *ioc;522522+523523+ list_for_each_entry(ioc, &ioc_list, list)524524+ ioc->aen_event_read_flag=0;525525+526526+ dctlprintk(("%s() called\n", __FUNCTION__));527527+ return fasync_helper(fd, filep, mode, &async_queue);528528+}529529+530530+static int531531+mptctl_release(struct inode *inode, struct file *filep)532532+{533533+ dctlprintk(("%s() called\n", __FUNCTION__));534534+ return fasync_helper(-1, filep, 0, &async_queue);478535}479536480537/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/···743674 u16 iocstat;744675 pFWDownloadReply_t ReplyMsg = NULL;745676746746- dctlprintk((KERN_INFO "mptctl_do_fwdl called. mptctl_id = %xh.\n", mptctl_id));677677+ dctlprintk(("mptctl_do_fwdl called. mptctl_id = %xh.\n", mptctl_id));747678748748- dctlprintk((KERN_INFO "DbG: kfwdl.bufp = %p\n", ufwbuf));749749- dctlprintk((KERN_INFO "DbG: kfwdl.fwlen = %d\n", (int)fwlen));750750- dctlprintk((KERN_INFO "DbG: kfwdl.ioc = %04xh\n", ioc));679679+ dctlprintk(("DbG: kfwdl.bufp = %p\n", ufwbuf));680680+ dctlprintk(("DbG: kfwdl.fwlen = %d\n", (int)fwlen));681681+ dctlprintk(("DbG: kfwdl.ioc = %04xh\n", ioc));751682752752- if ((ioc = mpt_verify_adapter(ioc, &iocp)) < 0) {753753- dctlprintk(("%s@%d::_ioctl_fwdl - ioc%d not found!\n",754754- __FILE__, __LINE__, ioc));683683+ if (mpt_verify_adapter(ioc, &iocp) < 0) {684684+ dctlprintk(("ioctl_fwdl - ioc%d not found!\n",685685+ ioc));755686 return -ENODEV; /* (-6) No such device or address */756756- }687687+ } else {757688758758- /* Valid device. Get a message frame and construct the FW download message.759759- */760760- if ((mf = mpt_get_msg_frame(mptctl_id, iocp)) == NULL)761761- return -EAGAIN;689689+ /* Valid device. Get a message frame and construct the FW download message.690690+ */691691+ if ((mf = mpt_get_msg_frame(mptctl_id, iocp)) == NULL)692692+ return -EAGAIN;693693+ }762694 dlmsg = (FWDownload_t*) mf;763695 ptsge = (FWDownloadTCSGE_t *) &dlmsg->SGL;764696 sgOut = (char *) (ptsge + 1);···772702 dlmsg->ChainOffset = 0;773703 dlmsg->Function = MPI_FUNCTION_FW_DOWNLOAD;774704 dlmsg->Reserved1[0] = dlmsg->Reserved1[1] = dlmsg->Reserved1[2] = 0;775775- dlmsg->MsgFlags = 0;705705+ if (iocp->facts.MsgVersion >= MPI_VERSION_01_05)706706+ dlmsg->MsgFlags = MPI_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT;707707+ else708708+ dlmsg->MsgFlags = 0;709709+776710777711 /* Set up the Transaction SGE.778712 */···828754 goto fwdl_out;829755 }830756831831- dctlprintk((KERN_INFO "DbG: sgl buffer = %p, sgfrags = %d\n", sgl, numfrags));757757+ dctlprintk(("DbG: sgl buffer = %p, sgfrags = %d\n", sgl, numfrags));832758833759 /*834760 * Parse SG list, copying sgl itself,···877803 /*878804 * Finally, perform firmware download.879805 */880880- iocp->ioctl->wait_done = 0;806806+ ReplyMsg = NULL;881807 mpt_put_msg_frame(mptctl_id, iocp, mf);882808883809 /* Now wait for the command to complete */884884- ret = wait_event_interruptible_timeout(mptctl_wait,810810+ ret = wait_event_timeout(mptctl_wait,885811 iocp->ioctl->wait_done == 1,886812 HZ*60);887813···12191145 /* Fill in the data and return the structure to the calling12201146 * program12211147 */12221222- if (ioc->bus_type == FC)11481148+ if (ioc->bus_type == SAS)11491149+ karg->adapterType = MPT_IOCTL_INTERFACE_SAS;11501150+ else if (ioc->bus_type == FC)12231151 karg->adapterType = MPT_IOCTL_INTERFACE_FC;12241152 else12251153 karg->adapterType = MPT_IOCTL_INTERFACE_SCSI;···12461170 karg->pciInfo.u.bits.deviceNumber = PCI_SLOT( pdev->devfn );12471171 karg->pciInfo.u.bits.functionNumber = PCI_FUNC( pdev->devfn );12481172 } else if (cim_rev == 2) {12491249- /* Get the PCI bus, device, function and segment ID numbers 11731173+ /* Get the PCI bus, device, function and segment ID numbers12501174 for the IOC */12511175 karg->pciInfo.u.bits.busNumber = pdev->bus->number;12521176 karg->pciInfo.u.bits.deviceNumber = PCI_SLOT( pdev->devfn );12531253- karg->pciInfo.u.bits.functionNumber = PCI_FUNC( pdev->devfn );12541177 karg->pciInfo.u.bits.functionNumber = PCI_FUNC( pdev->devfn );12551178 karg->pciInfo.segmentID = pci_domain_nr(pdev->bus);12561179 }···15751500 return -ENODEV;15761501 }1577150215781578- karg.eventEntries = ioc->eventLogSize;15031503+ karg.eventEntries = MPTCTL_EVENT_LOG_SIZE;15791504 karg.eventTypes = ioc->eventTypes;1580150515811506 /* Copy the data from kernel memory to user memory···16251550 memset(ioc->events, 0, sz);16261551 ioc->alloc_total += sz;1627155216281628- ioc->eventLogSize = MPTCTL_EVENT_LOG_SIZE;16291553 ioc->eventContext = 0;16301554 }16311555···16641590 maxEvents = numBytes/sizeof(MPT_IOCTL_EVENTS);166515911666159216671667- max = ioc->eventLogSize < maxEvents ? ioc->eventLogSize : maxEvents;15931593+ max = MPTCTL_EVENT_LOG_SIZE < maxEvents ? MPTCTL_EVENT_LOG_SIZE : maxEvents;1668159416691595 /* If fewer than 1 event is requested, there must have16701596 * been some type of error.16711597 */16721598 if ((max < 1) || !ioc->events)16731599 return -ENODATA;16001600+16011601+ /* reset this flag so SIGIO can restart */16021602+ ioc->aen_event_read_flag=0;1674160316751604 /* Copy the data from kernel memory to user memory16761605 */···18941817 case MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR:18951818 case MPI_FUNCTION_FW_DOWNLOAD:18961819 case MPI_FUNCTION_FC_PRIMITIVE_SEND:18201820+ case MPI_FUNCTION_TOOLBOX:18211821+ case MPI_FUNCTION_SAS_IO_UNIT_CONTROL:18971822 break;1898182318991824 case MPI_FUNCTION_SCSI_IO_REQUEST:···19161837 goto done_free_mem;19171838 }1918183919191919- pScsiReq->MsgFlags = mpt_msg_flags();18401840+ pScsiReq->MsgFlags &= ~MPI_SCSIIO_MSGFLGS_SENSE_WIDTH;18411841+ pScsiReq->MsgFlags |= mpt_msg_flags();18421842+1920184319211844 /* verify that app has not requested19221845 * more sense data than driver···19691888 }19701889 break;1971189018911891+ case MPI_FUNCTION_SMP_PASSTHROUGH:18921892+ /* Check mf->PassthruFlags to determine if18931893+ * transfer is ImmediateMode or not.18941894+ * Immediate mode returns data in the ReplyFrame.18951895+ * Else, we are sending request and response data18961896+ * in two SGLs at the end of the mf.18971897+ */18981898+ break;18991899+19001900+ case MPI_FUNCTION_SATA_PASSTHROUGH:19011901+ if (!ioc->sh) {19021902+ printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "19031903+ "SCSI driver is not loaded. \n",19041904+ __FILE__, __LINE__);19051905+ rc = -EFAULT;19061906+ goto done_free_mem;19071907+ }19081908+ break;19091909+19721910 case MPI_FUNCTION_RAID_ACTION:19731911 /* Just add a SGE19741912 */···20001900 int scsidir = MPI_SCSIIO_CONTROL_READ;20011901 int dataSize;2002190220032003- pScsiReq->MsgFlags = mpt_msg_flags();19031903+ pScsiReq->MsgFlags &= ~MPI_SCSIIO_MSGFLGS_SENSE_WIDTH;19041904+ pScsiReq->MsgFlags |= mpt_msg_flags();19051905+2004190620051907 /* verify that app has not requested20061908 * more sense data than driver···2232213022332131 /* Now wait for the command to complete */22342132 timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT;22352235- timeout = wait_event_interruptible_timeout(mptctl_wait,21332133+ timeout = wait_event_timeout(mptctl_wait,22362134 ioc->ioctl->wait_done == 1,22372135 HZ*timeout);22382136···23482246 hp_host_info_t __user *uarg = (void __user *) arg;23492247 MPT_ADAPTER *ioc;23502248 struct pci_dev *pdev;23512351- char *pbuf;22492249+ char *pbuf=NULL;23522250 dma_addr_t buf_dma;23532251 hp_host_info_t karg;23542252 CONFIGPARMS cfg;23552253 ConfigPageHeader_t hdr;23562254 int iocnum;23572255 int rc, cim_rev;22562256+ ToolboxIstwiReadWriteRequest_t *IstwiRWRequest;22572257+ MPT_FRAME_HDR *mf = NULL;22582258+ MPIHeader_t *mpi_hdr;2358225923592260 dctlprintk((": mptctl_hp_hostinfo called.\n"));23602261 /* Reset long to int. Should affect IA64 and SPARC only···2475237024762371 karg.base_io_addr = pci_resource_start(pdev, 0);2477237224782478- if (ioc->bus_type == FC)23732373+ if ((ioc->bus_type == SAS) || (ioc->bus_type == FC))24792374 karg.bus_phys_width = HP_BUS_WIDTH_UNK;24802375 else24812376 karg.bus_phys_width = HP_BUS_WIDTH_16;···24932388 }24942389 }2495239024962496- cfg.pageAddr = 0;24972497- cfg.action = MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL;24982498- cfg.dir = MPI_TB_ISTWI_FLAGS_READ;24992499- cfg.timeout = 10;25002500- pbuf = pci_alloc_consistent(ioc->pcidev, 4, &buf_dma);25012501- if (pbuf) {25022502- cfg.physAddr = buf_dma;25032503- if ((mpt_toolbox(ioc, &cfg)) == 0) {25042504- karg.rsvd = *(u32 *)pbuf;25052505- }25062506- pci_free_consistent(ioc->pcidev, 4, pbuf, buf_dma);25072507- pbuf = NULL;23912391+ /* 23922392+ * Gather ISTWI(Industry Standard Two Wire Interface) Data23932393+ */23942394+ if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {23952395+ dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",23962396+ ioc->name,__FUNCTION__));23972397+ goto out;25082398 }23992399+24002400+ IstwiRWRequest = (ToolboxIstwiReadWriteRequest_t *)mf;24012401+ mpi_hdr = (MPIHeader_t *) mf;24022402+ memset(IstwiRWRequest,0,sizeof(ToolboxIstwiReadWriteRequest_t));24032403+ IstwiRWRequest->Function = MPI_FUNCTION_TOOLBOX;24042404+ IstwiRWRequest->Tool = MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL;24052405+ IstwiRWRequest->MsgContext = mpi_hdr->MsgContext;24062406+ IstwiRWRequest->Flags = MPI_TB_ISTWI_FLAGS_READ;24072407+ IstwiRWRequest->NumAddressBytes = 0x01;24082408+ IstwiRWRequest->DataLength = cpu_to_le16(0x04);24092409+ if (pdev->devfn & 1)24102410+ IstwiRWRequest->DeviceAddr = 0xB2;24112411+ else24122412+ IstwiRWRequest->DeviceAddr = 0xB0;24132413+24142414+ pbuf = pci_alloc_consistent(ioc->pcidev, 4, &buf_dma);24152415+ if (!pbuf)24162416+ goto out;24172417+ mpt_add_sge((char *)&IstwiRWRequest->SGL,24182418+ (MPT_SGE_FLAGS_SSIMPLE_READ|4), buf_dma);24192419+24202420+ ioc->ioctl->wait_done = 0;24212421+ mpt_put_msg_frame(mptctl_id, ioc, mf);24222422+24232423+ rc = wait_event_timeout(mptctl_wait,24242424+ ioc->ioctl->wait_done == 1,24252425+ HZ*MPT_IOCTL_DEFAULT_TIMEOUT /* 10 sec */);24262426+24272427+ if(rc <=0 && (ioc->ioctl->wait_done != 1 )) {24282428+ /* 24292429+ * Now we need to reset the board24302430+ */24312431+ mpt_free_msg_frame(ioc, mf);24322432+ mptctl_timeout_expired(ioc->ioctl);24332433+ goto out;24342434+ }24352435+24362436+ /* 24372437+ *ISTWI Data Definition24382438+ * pbuf[0] = FW_VERSION = 0x424392439+ * pbuf[1] = Bay Count = 6 or 4 or 2, depending on24402440+ * the config, you should be seeing one out of these three values24412441+ * pbuf[2] = Drive Installed Map = bit pattern depend on which24422442+ * bays have drives in them24432443+ * pbuf[3] = Checksum (0x100 = (byte0 + byte2 + byte3)24442444+ */24452445+ if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID)24462446+ karg.rsvd = *(u32 *)pbuf;24472447+24482448+ out:24492449+ if (pbuf)24502450+ pci_free_consistent(ioc->pcidev, 4, pbuf, buf_dma);2509245125102452 /* Copy the data from kernel memory to user memory25112453 */···2611245926122460 /* There is nothing to do for FCP parts.26132461 */26142614- if (ioc->bus_type == FC)24622462+ if ((ioc->bus_type == SAS) || (ioc->bus_type == FC))26152463 return 0;2616246426172465 if ((ioc->spi_data.sdp0length == 0) || (ioc->sh == NULL))···27212569static struct file_operations mptctl_fops = {27222570 .owner = THIS_MODULE,27232571 .llseek = no_llseek,25722572+ .release = mptctl_release,25732573+ .fasync = mptctl_fasync,27242574 .unlocked_ioctl = mptctl_ioctl,27252575#ifdef CONFIG_COMPAT27262576 .compat_ioctl = compat_mpctl_ioctl,···29652811 dprintk((KERN_INFO MYNAM ": Registered for IOC reset notifications\n"));29662812 } else {29672813 /* FIXME! */28142814+ }28152815+28162816+ if (mpt_event_register(mptctl_id, mptctl_event_process) == 0) {28172817+ devtprintk((KERN_INFO MYNAM28182818+ ": Registered for IOC event notifications\n"));29682819 }2969282029702821 return 0;
···6363 unsigned size;6464 int retval;65656666- fibptr = fib_alloc(dev);6666+ fibptr = aac_fib_alloc(dev);6767 if(fibptr == NULL) {6868 return -ENOMEM;6969 }···7373 * First copy in the header so that we can check the size field.7474 */7575 if (copy_from_user((void *)kfib, arg, sizeof(struct aac_fibhdr))) {7676- fib_free(fibptr);7676+ aac_fib_free(fibptr);7777 return -EFAULT;7878 }7979 /*···110110 */111111 kfib->header.XferState = 0;112112 } else {113113- retval = fib_send(le16_to_cpu(kfib->header.Command), fibptr,113113+ retval = aac_fib_send(le16_to_cpu(kfib->header.Command), fibptr,114114 le16_to_cpu(kfib->header.Size) , FsaNormal,115115 1, 1, NULL, NULL);116116 if (retval) {117117 goto cleanup;118118 }119119- if (fib_complete(fibptr) != 0) {119119+ if (aac_fib_complete(fibptr) != 0) {120120 retval = -EINVAL;121121 goto cleanup;122122 }···138138 fibptr->hw_fib_pa = hw_fib_pa;139139 fibptr->hw_fib = hw_fib;140140 }141141- fib_free(fibptr);141141+ aac_fib_free(fibptr);142142 return retval;143143}144144···464464 /*465465 * Allocate and initialize a Fib then setup a BlockWrite command466466 */467467- if (!(srbfib = fib_alloc(dev))) {467467+ if (!(srbfib = aac_fib_alloc(dev))) {468468 return -ENOMEM;469469 }470470- fib_init(srbfib);470470+ aac_fib_init(srbfib);471471472472 srbcmd = (struct aac_srb*) fib_data(srbfib);473473···601601602602 srbcmd->count = cpu_to_le32(byte_count);603603 psg->count = cpu_to_le32(sg_indx+1);604604- status = fib_send(ScsiPortCommand64, srbfib, actual_fibsize, FsaNormal, 1, 1,NULL,NULL);604604+ status = aac_fib_send(ScsiPortCommand64, srbfib, actual_fibsize, FsaNormal, 1, 1,NULL,NULL);605605 } else {606606 struct user_sgmap* upsg = &user_srbcmd->sg;607607 struct sgmap* psg = &srbcmd->sg;···649649 }650650 srbcmd->count = cpu_to_le32(byte_count);651651 psg->count = cpu_to_le32(sg_indx+1);652652- status = fib_send(ScsiPortCommand, srbfib, actual_fibsize, FsaNormal, 1, 1, NULL, NULL);652652+ status = aac_fib_send(ScsiPortCommand, srbfib, actual_fibsize, FsaNormal, 1, 1, NULL, NULL);653653 }654654655655 if (status != 0){···684684 for(i=0; i <= sg_indx; i++){685685 kfree(sg_list[i]);686686 }687687- fib_complete(srbfib);688688- fib_free(srbfib);687687+ aac_fib_complete(srbfib);688688+ aac_fib_free(srbfib);689689690690 return rcode;691691}
+6-6
drivers/scsi/aacraid/comminit.c
···185185 struct aac_close *cmd;186186 int status;187187188188- fibctx = fib_alloc(dev);188188+ fibctx = aac_fib_alloc(dev);189189 if (!fibctx)190190 return -ENOMEM;191191- fib_init(fibctx);191191+ aac_fib_init(fibctx);192192193193 cmd = (struct aac_close *) fib_data(fibctx);194194195195 cmd->command = cpu_to_le32(VM_CloseAll);196196 cmd->cid = cpu_to_le32(0xffffffff);197197198198- status = fib_send(ContainerCommand,198198+ status = aac_fib_send(ContainerCommand,199199 fibctx,200200 sizeof(struct aac_close),201201 FsaNormal,···203203 NULL, NULL);204204205205 if (status == 0)206206- fib_complete(fibctx);207207- fib_free(fibctx);206206+ aac_fib_complete(fibctx);207207+ aac_fib_free(fibctx);208208 return status;209209}210210···427427 /*428428 * Initialize the list of fibs429429 */430430- if(fib_setup(dev)<0){430430+ if (aac_fib_setup(dev) < 0) {431431 kfree(dev->queues);432432 return NULL;433433 }
+26-24
drivers/scsi/aacraid/commsup.c
···6767}68686969/**7070- * fib_map_free - free the fib objects7070+ * aac_fib_map_free - free the fib objects7171 * @dev: Adapter to free7272 *7373 * Free the PCI mappings and the memory allocated for FIB blocks7474 * on this adapter.7575 */76767777-void fib_map_free(struct aac_dev *dev)7777+void aac_fib_map_free(struct aac_dev *dev)7878{7979 pci_free_consistent(dev->pdev, dev->max_fib_size * (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB), dev->hw_fib_va, dev->hw_fib_pa);8080}81818282/**8383- * fib_setup - setup the fibs8383+ * aac_fib_setup - setup the fibs8484 * @dev: Adapter to set up8585 *8686 * Allocate the PCI space for the fibs, map it and then intialise the8787 * fib area, the unmapped fib data and also the free list8888 */89899090-int fib_setup(struct aac_dev * dev)9090+int aac_fib_setup(struct aac_dev * dev)9191{9292 struct fib *fibptr;9393 struct hw_fib *hw_fib_va;···134134}135135136136/**137137- * fib_alloc - allocate a fib137137+ * aac_fib_alloc - allocate a fib138138 * @dev: Adapter to allocate the fib for139139 *140140 * Allocate a fib from the adapter fib pool. If the pool is empty we141141 * return NULL.142142 */143143144144-struct fib * fib_alloc(struct aac_dev *dev)144144+struct fib *aac_fib_alloc(struct aac_dev *dev)145145{146146 struct fib * fibptr;147147 unsigned long flags;···170170}171171172172/**173173- * fib_free - free a fib173173+ * aac_fib_free - free a fib174174 * @fibptr: fib to free up175175 *176176 * Frees up a fib and places it on the appropriate queue177177 * (either free or timed out)178178 */179179180180-void fib_free(struct fib * fibptr)180180+void aac_fib_free(struct fib *fibptr)181181{182182 unsigned long flags;183183···188188 fibptr->dev->timeout_fib = fibptr;189189 } else {190190 if (fibptr->hw_fib->header.XferState != 0) {191191- printk(KERN_WARNING "fib_free, XferState != 0, fibptr = 0x%p, XferState = 0x%x\n", 191191+ printk(KERN_WARNING "aac_fib_free, XferState != 0, fibptr = 0x%p, XferState = 0x%x\n",192192 (void*)fibptr, 193193 le32_to_cpu(fibptr->hw_fib->header.XferState));194194 }···199199}200200201201/**202202- * fib_init - initialise a fib202202+ * aac_fib_init - initialise a fib203203 * @fibptr: The fib to initialize204204 * 205205 * Set up the generic fib fields ready for use206206 */207207208208-void fib_init(struct fib *fibptr)208208+void aac_fib_init(struct fib *fibptr)209209{210210 struct hw_fib *hw_fib = fibptr->hw_fib;211211···362362 */363363364364/**365365- * fib_send - send a fib to the adapter365365+ * aac_fib_send - send a fib to the adapter366366 * @command: Command to send367367 * @fibptr: The fib368368 * @size: Size of fib data area···378378 * response FIB is received from the adapter.379379 */380380381381-int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority, int wait, int reply, fib_callback callback, void * callback_data)381381+int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,382382+ int priority, int wait, int reply, fib_callback callback,383383+ void *callback_data)382384{383385 struct aac_dev * dev = fibptr->dev;384386 struct hw_fib * hw_fib = fibptr->hw_fib;···495493 q->numpending++;496494 *(q->headers.producer) = cpu_to_le32(index + 1);497495 spin_unlock_irqrestore(q->lock, qflags);498498- dprintk((KERN_DEBUG "fib_send: inserting a queue entry at index %d.\n",index));496496+ dprintk((KERN_DEBUG "aac_fib_send: inserting a queue entry at index %d.\n",index));499497 if (!(nointr & aac_config.irq_mod))500498 aac_adapter_notify(dev, AdapNormCmdQueue);501499 }···522520 list_del(&fibptr->queue);523521 spin_unlock_irqrestore(q->lock, qflags);524522 if (wait == -1) {525525- printk(KERN_ERR "aacraid: fib_send: first asynchronous command timed out.\n"523523+ printk(KERN_ERR "aacraid: aac_fib_send: first asynchronous command timed out.\n"526524 "Usually a result of a PCI interrupt routing problem;\n"527525 "update mother board BIOS or consider utilizing one of\n"528526 "the SAFE mode kernel options (acpi, apic etc)\n");···626624} 627625628626/**629629- * fib_adapter_complete - complete adapter issued fib627627+ * aac_fib_adapter_complete - complete adapter issued fib630628 * @fibptr: fib to complete631629 * @size: size of fib632630 *···634632 * the adapter.635633 */636634637637-int fib_adapter_complete(struct fib * fibptr, unsigned short size)635635+int aac_fib_adapter_complete(struct fib *fibptr, unsigned short size)638636{639637 struct hw_fib * hw_fib = fibptr->hw_fib;640638 struct aac_dev * dev = fibptr->dev;···685683 }686684 else 687685 {688688- printk(KERN_WARNING "fib_adapter_complete: Unknown xferstate detected.\n");686686+ printk(KERN_WARNING "aac_fib_adapter_complete: Unknown xferstate detected.\n");689687 BUG();690688 } 691689 return 0;692690}693691694692/**695695- * fib_complete - fib completion handler693693+ * aac_fib_complete - fib completion handler696694 * @fib: FIB to complete697695 *698696 * Will do all necessary work to complete a FIB.699697 */700698701701-int fib_complete(struct fib * fibptr)699699+int aac_fib_complete(struct fib *fibptr)702700{703701 struct hw_fib * hw_fib = fibptr->hw_fib;704702···997995 if (!dev || !dev->scsi_host_ptr)998996 return;999997 /*10001000- * force reload of disk info via probe_container998998+ * force reload of disk info via aac_probe_container1001999 */10021000 if ((device_config_needed == CHANGE)10031001 && (dev->fsa_dev[container].valid == 1))10041002 dev->fsa_dev[container].valid = 2;10051003 if ((device_config_needed == CHANGE) ||10061004 (device_config_needed == ADD))10071007- probe_container(dev, container);10051005+ aac_probe_container(dev, container);10081006 device = scsi_device_lookup(dev->scsi_host_ptr, 10091007 CONTAINER_TO_CHANNEL(container), 10101008 CONTAINER_TO_ID(container), ···11061104 /* Handle Driver Notify Events */11071105 aac_handle_aif(dev, fib);11081106 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);11091109- fib_adapter_complete(fib, (u16)sizeof(u32));11071107+ aac_fib_adapter_complete(fib, (u16)sizeof(u32));11101108 } else {11111109 struct list_head *entry;11121110 /* The u32 here is important and intended. We are using···12431241 * Set the status of this FIB12441242 */12451243 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);12461246- fib_adapter_complete(fib, sizeof(u32));12441244+ aac_fib_adapter_complete(fib, sizeof(u32));12471245 spin_unlock_irqrestore(&dev->fib_lock, flagv);12481246 /* Free up the remaining resources */12491247 hw_fib_p = hw_fib_pool;
+1-1
drivers/scsi/aacraid/dpcsup.c
···206206 * Set the status of this FIB207207 */208208 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);209209- fib_adapter_complete(fib, sizeof(u32));209209+ aac_fib_adapter_complete(fib, sizeof(u32));210210 spin_lock_irqsave(q->lock, flags);211211 } 212212 }
+39-11
drivers/scsi/aacraid/linit.c
···385385386386static int aac_slave_configure(struct scsi_device *sdev)387387{388388- struct Scsi_Host *host = sdev->host;388388+ if (sdev_channel(sdev) == CONTAINER_CHANNEL) {389389+ sdev->skip_ms_page_8 = 1;390390+ sdev->skip_ms_page_3f = 1;391391+ }392392+ if ((sdev->type == TYPE_DISK) &&393393+ (sdev_channel(sdev) != CONTAINER_CHANNEL)) {394394+ struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;395395+ if (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))396396+ sdev->no_uld_attach = 1;397397+ }398398+ if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&399399+ (sdev_channel(sdev) == CONTAINER_CHANNEL)) {400400+ struct scsi_device * dev;401401+ struct Scsi_Host *host = sdev->host;402402+ unsigned num_lsu = 0;403403+ unsigned num_one = 0;404404+ unsigned depth;389405390390- if (sdev->tagged_supported)391391- scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, 128);392392- else406406+ __shost_for_each_device(dev, host) {407407+ if (dev->tagged_supported && (dev->type == TYPE_DISK) &&408408+ (sdev_channel(dev) == CONTAINER_CHANNEL))409409+ ++num_lsu;410410+ else411411+ ++num_one;412412+ }413413+ if (num_lsu == 0)414414+ ++num_lsu;415415+ depth = (host->can_queue - num_one) / num_lsu;416416+ if (depth > 256)417417+ depth = 256;418418+ else if (depth < 2)419419+ depth = 2;420420+ scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, depth);421421+ if (!(((struct aac_dev *)host->hostdata)->adapter_info.options &422422+ AAC_OPT_NEW_COMM))423423+ blk_queue_max_segment_size(sdev->request_queue, 65536);424424+ } else393425 scsi_adjust_queue_depth(sdev, 0, 1);394394-395395- if (!(((struct aac_dev *)host->hostdata)->adapter_info.options396396- & AAC_OPT_NEW_COMM))397397- blk_queue_max_segment_size(sdev->request_queue, 65536);398426399427 return 0;400428}···898870899871 /*900872 * max channel will be the physical channels plus 1 virtual channel901901- * all containers are on the virtual channel 0873873+ * all containers are on the virtual channel 0 (CONTAINER_CHANNEL)902874 * physical channels are address by their actual physical number+1903875 */904876 if (aac->nondasd_support == 1)···941913 aac_adapter_disable_int(aac);942914 free_irq(pdev->irq, aac);943915 out_unmap:944944- fib_map_free(aac);916916+ aac_fib_map_free(aac);945917 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);946918 kfree(aac->queues);947919 iounmap(aac->regs.sa);···975947976948 aac_send_shutdown(aac);977949 aac_adapter_disable_int(aac);978978- fib_map_free(aac);950950+ aac_fib_map_free(aac);979951 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,980952 aac->comm_phys);981953 kfree(aac->queues);
···55#include <linux/mutex.h>6677#define MEGARAID_VERSION \88- "v2.00.3 (Release Date: Wed Feb 19 08:51:30 EST 2003)\n"88+ "v2.00.4 (Release Date: Thu Feb 9 08:51:30 EST 2006)\n"991010/*1111 * Driver features - change the values to enable or disable features in the
+99-2
drivers/scsi/megaraid/megaraid_sas.c
···1010 * 2 of the License, or (at your option) any later version.1111 *1212 * FILE : megaraid_sas.c1313- * Version : v00.00.02.021313+ * Version : v00.00.02.041414 *1515 * Authors:1616 * Sreenivas Bagalkote <Sreenivas.Bagalkote@lsil.com>···5959 PCI_ANY_ID,6060 PCI_ANY_ID,6161 },6262+ {6363+ PCI_VENDOR_ID_LSI_LOGIC,6464+ PCI_DEVICE_ID_LSI_SAS1078R, // ppc IOP6565+ PCI_ANY_ID,6666+ PCI_ANY_ID,6767+ },6268 {6369 PCI_VENDOR_ID_DELL,6470 PCI_DEVICE_ID_DELL_PERC5, // xscale IOP···202196/**203197* This is the end of set of functions & definitions specific 204198* to xscale (deviceid : 1064R, PERC5) controllers199199+*/200200+201201+/**202202+* The following functions are defined for ppc (deviceid : 0x60) 203203+* controllers204204+*/205205+206206+/**207207+ * megasas_enable_intr_ppc - Enables interrupts208208+ * @regs: MFI register set209209+ */210210+static inline void211211+megasas_enable_intr_ppc(struct megasas_register_set __iomem * regs)212212+{213213+ writel(0xFFFFFFFF, &(regs)->outbound_doorbell_clear);214214+215215+ writel(~0x80000004, &(regs)->outbound_intr_mask);216216+217217+ /* Dummy readl to force pci flush */218218+ readl(®s->outbound_intr_mask);219219+}220220+221221+/**222222+ * megasas_read_fw_status_reg_ppc - returns the current FW status value223223+ * @regs: MFI register set224224+ */225225+static u32226226+megasas_read_fw_status_reg_ppc(struct megasas_register_set __iomem * regs)227227+{228228+ return readl(&(regs)->outbound_scratch_pad);229229+}230230+231231+/**232232+ * megasas_clear_interrupt_ppc - Check & clear interrupt233233+ * @regs: MFI register set234234+ */235235+static int 236236+megasas_clear_intr_ppc(struct megasas_register_set __iomem * regs)237237+{238238+ u32 status;239239+ /*240240+ * Check if it is our interrupt241241+ */242242+ status = readl(®s->outbound_intr_status);243243+244244+ if (!(status & MFI_REPLY_1078_MESSAGE_INTERRUPT)) {245245+ return 1;246246+ }247247+248248+ /*249249+ * Clear the interrupt by writing back the same value250250+ */251251+ writel(status, ®s->outbound_doorbell_clear);252252+253253+ return 0;254254+}255255+/**256256+ * megasas_fire_cmd_ppc - Sends command to the FW257257+ * @frame_phys_addr : Physical address of cmd258258+ * @frame_count : Number of frames for the command259259+ * @regs : MFI register set260260+ */261261+static inline void 262262+megasas_fire_cmd_ppc(dma_addr_t frame_phys_addr, u32 frame_count, struct megasas_register_set __iomem *regs)263263+{264264+ writel((frame_phys_addr | (frame_count<<1))|1, 265265+ &(regs)->inbound_queue_port);266266+}267267+268268+static struct megasas_instance_template megasas_instance_template_ppc = {269269+270270+ .fire_cmd = megasas_fire_cmd_ppc,271271+ .enable_intr = megasas_enable_intr_ppc,272272+ .clear_intr = megasas_clear_intr_ppc,273273+ .read_fw_status_reg = megasas_read_fw_status_reg_ppc,274274+};275275+276276+/**277277+* This is the end of set of functions & definitions278278+* specific to ppc (deviceid : 0x60) controllers205279*/206280207281/**···1693160716941608 reg_set = instance->reg_set;1695160916961696- instance->instancet = &megasas_instance_template_xscale;16101610+ switch(instance->pdev->device)16111611+ {16121612+ case PCI_DEVICE_ID_LSI_SAS1078R: 16131613+ instance->instancet = &megasas_instance_template_ppc;16141614+ break;16151615+ case PCI_DEVICE_ID_LSI_SAS1064R:16161616+ case PCI_DEVICE_ID_DELL_PERC5:16171617+ default:16181618+ instance->instancet = &megasas_instance_template_xscale;16191619+ break;16201620+ }1697162116981622 /*16991623 * We expect the FW state to be READY···20791983 host->max_channel = MEGASAS_MAX_CHANNELS - 1;20801984 host->max_id = MEGASAS_MAX_DEV_PER_CHANNEL;20811985 host->max_lun = MEGASAS_MAX_LUN;19861986+ host->max_cmd_len = 16;2082198720831988 /*20841989 * Notify the mid-layer about the new controller
···433433/* Used to obtain the PCI location of a device */434434#define SCSI_IOCTL_GET_PCI 0x5387435435436436+int scsi_execute_in_process_context(void (*fn)(void *data), void *data);437437+436438#endif /* _SCSI_SCSI_H */
+18-16
include/scsi/scsi_transport_iscsi.h
···6363 int max_lun;6464 unsigned int max_conn;6565 unsigned int max_cmd_len;6666- struct Scsi_Host *(*create_session) (struct scsi_transport_template *t,6767- uint32_t initial_cmdsn);6868- void (*destroy_session) (struct Scsi_Host *shost);6969- struct iscsi_cls_conn *(*create_conn) (struct Scsi_Host *shost,6666+ struct iscsi_cls_session *(*create_session)6767+ (struct scsi_transport_template *t, uint32_t sn, uint32_t *sid);6868+ void (*destroy_session) (struct iscsi_cls_session *session);6969+ struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess,7070 uint32_t cid);7171- int (*bind_conn) (iscsi_sessionh_t session, iscsi_connh_t conn,7171+ int (*bind_conn) (struct iscsi_cls_session *session,7272+ struct iscsi_cls_conn *cls_conn,7273 uint32_t transport_fd, int is_leading);7373- int (*start_conn) (iscsi_connh_t conn);7474- void (*stop_conn) (iscsi_connh_t conn, int flag);7474+ int (*start_conn) (struct iscsi_cls_conn *conn);7575+ void (*stop_conn) (struct iscsi_cls_conn *conn, int flag);7576 void (*destroy_conn) (struct iscsi_cls_conn *conn);7676- int (*set_param) (iscsi_connh_t conn, enum iscsi_param param,7777+ int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param,7778 uint32_t value);7878- int (*get_conn_param) (void *conndata, enum iscsi_param param,7979+ int (*get_conn_param) (struct iscsi_cls_conn *conn,8080+ enum iscsi_param param,7981 uint32_t *value);8080- int (*get_session_param) (struct Scsi_Host *shost,8282+ int (*get_session_param) (struct iscsi_cls_session *session,8183 enum iscsi_param param, uint32_t *value);8282- int (*send_pdu) (iscsi_connh_t conn, struct iscsi_hdr *hdr,8484+ int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,8385 char *data, uint32_t data_size);8484- void (*get_stats) (iscsi_connh_t conn, struct iscsi_stats *stats);8686+ void (*get_stats) (struct iscsi_cls_conn *conn,8787+ struct iscsi_stats *stats);8588};86898790/*···9693/*9794 * control plane upcalls9895 */9999-extern void iscsi_conn_error(iscsi_connh_t conn, enum iscsi_err error);100100-extern int iscsi_recv_pdu(iscsi_connh_t conn, struct iscsi_hdr *hdr,9696+extern void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error);9797+extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr,10198 char *data, uint32_t data_size);10299103100struct iscsi_cls_conn {104101 struct list_head conn_list; /* item in connlist */105102 void *dd_data; /* LLD private data */106103 struct iscsi_transport *transport;107107- iscsi_connh_t connh;108104 int active; /* must be accessed with the connlock */109105 struct device dev; /* sysfs transport/container device */110106 struct mempool_zone *z_error;···115113 container_of(_dev, struct iscsi_cls_conn, dev)116114117115struct iscsi_cls_session {118118- struct list_head list; /* item in session_list */116116+ struct list_head sess_list; /* item in session_list */119117 struct iscsi_transport *transport;120118 struct device dev; /* sysfs transport/container device */121119};