diff options
author | Christoph Hellwig <hch@lst.de> | 2005-08-18 10:26:15 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-09-04 20:48:06 -0400 |
commit | 69218ee5186aded6c78e12e083e073d000ff2e9b (patch) | |
tree | 6dfd357efa1a17fa3c845570c722185b568423f0 /drivers/message | |
parent | 1ff927306e08b356d764e605eff7c50079550bd2 (diff) |
[SCSI] fusion: extended config header support
Acked by: Moore, Eric Dean <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 90 | ||||
-rw-r--r-- | drivers/message/fusion/mptbase.h | 5 | ||||
-rw-r--r-- | drivers/message/fusion/mptctl.c | 12 | ||||
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 18 |
4 files changed, 81 insertions, 44 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index ffbe6f4720e1..284202766804 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -491,10 +491,21 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply) | |||
491 | 491 | ||
492 | pCfg->status = status; | 492 | pCfg->status = status; |
493 | if (status == MPI_IOCSTATUS_SUCCESS) { | 493 | if (status == MPI_IOCSTATUS_SUCCESS) { |
494 | pCfg->hdr->PageVersion = pReply->Header.PageVersion; | 494 | if ((pReply->Header.PageType & |
495 | pCfg->hdr->PageLength = pReply->Header.PageLength; | 495 | MPI_CONFIG_PAGETYPE_MASK) == |
496 | pCfg->hdr->PageNumber = pReply->Header.PageNumber; | 496 | MPI_CONFIG_PAGETYPE_EXTENDED) { |
497 | pCfg->hdr->PageType = pReply->Header.PageType; | 497 | pCfg->cfghdr.ehdr->ExtPageLength = |
498 | le16_to_cpu(pReply->ExtPageLength); | ||
499 | pCfg->cfghdr.ehdr->ExtPageType = | ||
500 | pReply->ExtPageType; | ||
501 | } | ||
502 | pCfg->cfghdr.hdr->PageVersion = pReply->Header.PageVersion; | ||
503 | |||
504 | /* If this is a regular header, save PageLength. */ | ||
505 | /* LMP Do this better so not using a reserved field! */ | ||
506 | pCfg->cfghdr.hdr->PageLength = pReply->Header.PageLength; | ||
507 | pCfg->cfghdr.hdr->PageNumber = pReply->Header.PageNumber; | ||
508 | pCfg->cfghdr.hdr->PageType = pReply->Header.PageType; | ||
498 | } | 509 | } |
499 | } | 510 | } |
500 | 511 | ||
@@ -3819,7 +3830,7 @@ GetLanConfigPages(MPT_ADAPTER *ioc) | |||
3819 | hdr.PageLength = 0; | 3830 | hdr.PageLength = 0; |
3820 | hdr.PageNumber = 0; | 3831 | hdr.PageNumber = 0; |
3821 | hdr.PageType = MPI_CONFIG_PAGETYPE_LAN; | 3832 | hdr.PageType = MPI_CONFIG_PAGETYPE_LAN; |
3822 | cfg.hdr = &hdr; | 3833 | cfg.cfghdr.hdr = &hdr; |
3823 | cfg.physAddr = -1; | 3834 | cfg.physAddr = -1; |
3824 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 3835 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
3825 | cfg.dir = 0; | 3836 | cfg.dir = 0; |
@@ -3863,7 +3874,7 @@ GetLanConfigPages(MPT_ADAPTER *ioc) | |||
3863 | hdr.PageLength = 0; | 3874 | hdr.PageLength = 0; |
3864 | hdr.PageNumber = 1; | 3875 | hdr.PageNumber = 1; |
3865 | hdr.PageType = MPI_CONFIG_PAGETYPE_LAN; | 3876 | hdr.PageType = MPI_CONFIG_PAGETYPE_LAN; |
3866 | cfg.hdr = &hdr; | 3877 | cfg.cfghdr.hdr = &hdr; |
3867 | cfg.physAddr = -1; | 3878 | cfg.physAddr = -1; |
3868 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 3879 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
3869 | cfg.dir = 0; | 3880 | cfg.dir = 0; |
@@ -3930,7 +3941,7 @@ GetFcPortPage0(MPT_ADAPTER *ioc, int portnum) | |||
3930 | hdr.PageLength = 0; | 3941 | hdr.PageLength = 0; |
3931 | hdr.PageNumber = 0; | 3942 | hdr.PageNumber = 0; |
3932 | hdr.PageType = MPI_CONFIG_PAGETYPE_FC_PORT; | 3943 | hdr.PageType = MPI_CONFIG_PAGETYPE_FC_PORT; |
3933 | cfg.hdr = &hdr; | 3944 | cfg.cfghdr.hdr = &hdr; |
3934 | cfg.physAddr = -1; | 3945 | cfg.physAddr = -1; |
3935 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 3946 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
3936 | cfg.dir = 0; | 3947 | cfg.dir = 0; |
@@ -4012,7 +4023,7 @@ GetIoUnitPage2(MPT_ADAPTER *ioc) | |||
4012 | hdr.PageLength = 0; | 4023 | hdr.PageLength = 0; |
4013 | hdr.PageNumber = 2; | 4024 | hdr.PageNumber = 2; |
4014 | hdr.PageType = MPI_CONFIG_PAGETYPE_IO_UNIT; | 4025 | hdr.PageType = MPI_CONFIG_PAGETYPE_IO_UNIT; |
4015 | cfg.hdr = &hdr; | 4026 | cfg.cfghdr.hdr = &hdr; |
4016 | cfg.physAddr = -1; | 4027 | cfg.physAddr = -1; |
4017 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 4028 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
4018 | cfg.dir = 0; | 4029 | cfg.dir = 0; |
@@ -4102,7 +4113,7 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum) | |||
4102 | header.PageLength = 0; | 4113 | header.PageLength = 0; |
4103 | header.PageNumber = 0; | 4114 | header.PageNumber = 0; |
4104 | header.PageType = MPI_CONFIG_PAGETYPE_SCSI_PORT; | 4115 | header.PageType = MPI_CONFIG_PAGETYPE_SCSI_PORT; |
4105 | cfg.hdr = &header; | 4116 | cfg.cfghdr.hdr = &header; |
4106 | cfg.physAddr = -1; | 4117 | cfg.physAddr = -1; |
4107 | cfg.pageAddr = portnum; | 4118 | cfg.pageAddr = portnum; |
4108 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 4119 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
@@ -4168,7 +4179,7 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum) | |||
4168 | header.PageLength = 0; | 4179 | header.PageLength = 0; |
4169 | header.PageNumber = 2; | 4180 | header.PageNumber = 2; |
4170 | header.PageType = MPI_CONFIG_PAGETYPE_SCSI_PORT; | 4181 | header.PageType = MPI_CONFIG_PAGETYPE_SCSI_PORT; |
4171 | cfg.hdr = &header; | 4182 | cfg.cfghdr.hdr = &header; |
4172 | cfg.physAddr = -1; | 4183 | cfg.physAddr = -1; |
4173 | cfg.pageAddr = portnum; | 4184 | cfg.pageAddr = portnum; |
4174 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 4185 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
@@ -4236,7 +4247,7 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum) | |||
4236 | header.PageLength = 0; | 4247 | header.PageLength = 0; |
4237 | header.PageNumber = 1; | 4248 | header.PageNumber = 1; |
4238 | header.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; | 4249 | header.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; |
4239 | cfg.hdr = &header; | 4250 | cfg.cfghdr.hdr = &header; |
4240 | cfg.physAddr = -1; | 4251 | cfg.physAddr = -1; |
4241 | cfg.pageAddr = portnum; | 4252 | cfg.pageAddr = portnum; |
4242 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 4253 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
@@ -4245,8 +4256,8 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum) | |||
4245 | if (mpt_config(ioc, &cfg) != 0) | 4256 | if (mpt_config(ioc, &cfg) != 0) |
4246 | return -EFAULT; | 4257 | return -EFAULT; |
4247 | 4258 | ||
4248 | ioc->spi_data.sdp1version = cfg.hdr->PageVersion; | 4259 | ioc->spi_data.sdp1version = cfg.cfghdr.hdr->PageVersion; |
4249 | ioc->spi_data.sdp1length = cfg.hdr->PageLength; | 4260 | ioc->spi_data.sdp1length = cfg.cfghdr.hdr->PageLength; |
4250 | 4261 | ||
4251 | header.PageVersion = 0; | 4262 | header.PageVersion = 0; |
4252 | header.PageLength = 0; | 4263 | header.PageLength = 0; |
@@ -4255,8 +4266,8 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum) | |||
4255 | if (mpt_config(ioc, &cfg) != 0) | 4266 | if (mpt_config(ioc, &cfg) != 0) |
4256 | return -EFAULT; | 4267 | return -EFAULT; |
4257 | 4268 | ||
4258 | ioc->spi_data.sdp0version = cfg.hdr->PageVersion; | 4269 | ioc->spi_data.sdp0version = cfg.cfghdr.hdr->PageVersion; |
4259 | ioc->spi_data.sdp0length = cfg.hdr->PageLength; | 4270 | ioc->spi_data.sdp0length = cfg.cfghdr.hdr->PageLength; |
4260 | 4271 | ||
4261 | dcprintk((MYIOC_s_INFO_FMT "Headers: 0: version %d length %d\n", | 4272 | dcprintk((MYIOC_s_INFO_FMT "Headers: 0: version %d length %d\n", |
4262 | ioc->name, ioc->spi_data.sdp0version, ioc->spi_data.sdp0length)); | 4273 | ioc->name, ioc->spi_data.sdp0version, ioc->spi_data.sdp0length)); |
@@ -4298,7 +4309,7 @@ mpt_findImVolumes(MPT_ADAPTER *ioc) | |||
4298 | header.PageLength = 0; | 4309 | header.PageLength = 0; |
4299 | header.PageNumber = 2; | 4310 | header.PageNumber = 2; |
4300 | header.PageType = MPI_CONFIG_PAGETYPE_IOC; | 4311 | header.PageType = MPI_CONFIG_PAGETYPE_IOC; |
4301 | cfg.hdr = &header; | 4312 | cfg.cfghdr.hdr = &header; |
4302 | cfg.physAddr = -1; | 4313 | cfg.physAddr = -1; |
4303 | cfg.pageAddr = 0; | 4314 | cfg.pageAddr = 0; |
4304 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 4315 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
@@ -4394,7 +4405,7 @@ mpt_read_ioc_pg_3(MPT_ADAPTER *ioc) | |||
4394 | header.PageLength = 0; | 4405 | header.PageLength = 0; |
4395 | header.PageNumber = 3; | 4406 | header.PageNumber = 3; |
4396 | header.PageType = MPI_CONFIG_PAGETYPE_IOC; | 4407 | header.PageType = MPI_CONFIG_PAGETYPE_IOC; |
4397 | cfg.hdr = &header; | 4408 | cfg.cfghdr.hdr = &header; |
4398 | cfg.physAddr = -1; | 4409 | cfg.physAddr = -1; |
4399 | cfg.pageAddr = 0; | 4410 | cfg.pageAddr = 0; |
4400 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 4411 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
@@ -4446,7 +4457,7 @@ mpt_read_ioc_pg_4(MPT_ADAPTER *ioc) | |||
4446 | header.PageLength = 0; | 4457 | header.PageLength = 0; |
4447 | header.PageNumber = 4; | 4458 | header.PageNumber = 4; |
4448 | header.PageType = MPI_CONFIG_PAGETYPE_IOC; | 4459 | header.PageType = MPI_CONFIG_PAGETYPE_IOC; |
4449 | cfg.hdr = &header; | 4460 | cfg.cfghdr.hdr = &header; |
4450 | cfg.physAddr = -1; | 4461 | cfg.physAddr = -1; |
4451 | cfg.pageAddr = 0; | 4462 | cfg.pageAddr = 0; |
4452 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 4463 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
@@ -4498,7 +4509,7 @@ mpt_read_ioc_pg_1(MPT_ADAPTER *ioc) | |||
4498 | header.PageLength = 0; | 4509 | header.PageLength = 0; |
4499 | header.PageNumber = 1; | 4510 | header.PageNumber = 1; |
4500 | header.PageType = MPI_CONFIG_PAGETYPE_IOC; | 4511 | header.PageType = MPI_CONFIG_PAGETYPE_IOC; |
4501 | cfg.hdr = &header; | 4512 | cfg.cfghdr.hdr = &header; |
4502 | cfg.physAddr = -1; | 4513 | cfg.physAddr = -1; |
4503 | cfg.pageAddr = 0; | 4514 | cfg.pageAddr = 0; |
4504 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 4515 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
@@ -4647,10 +4658,11 @@ int | |||
4647 | mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg) | 4658 | mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg) |
4648 | { | 4659 | { |
4649 | Config_t *pReq; | 4660 | Config_t *pReq; |
4661 | ConfigExtendedPageHeader_t *pExtHdr = NULL; | ||
4650 | MPT_FRAME_HDR *mf; | 4662 | MPT_FRAME_HDR *mf; |
4651 | unsigned long flags; | 4663 | unsigned long flags; |
4652 | int ii, rc; | 4664 | int ii, rc; |
4653 | u32 flagsLength; | 4665 | int flagsLength; |
4654 | int in_isr; | 4666 | int in_isr; |
4655 | 4667 | ||
4656 | /* Prevent calling wait_event() (below), if caller happens | 4668 | /* Prevent calling wait_event() (below), if caller happens |
@@ -4675,16 +4687,30 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg) | |||
4675 | pReq->Reserved = 0; | 4687 | pReq->Reserved = 0; |
4676 | pReq->ChainOffset = 0; | 4688 | pReq->ChainOffset = 0; |
4677 | pReq->Function = MPI_FUNCTION_CONFIG; | 4689 | pReq->Function = MPI_FUNCTION_CONFIG; |
4690 | |||
4691 | /* Assume page type is not extended and clear "reserved" fields. */ | ||
4678 | pReq->ExtPageLength = 0; | 4692 | pReq->ExtPageLength = 0; |
4679 | pReq->ExtPageType = 0; | 4693 | pReq->ExtPageType = 0; |
4680 | pReq->MsgFlags = 0; | 4694 | pReq->MsgFlags = 0; |
4695 | |||
4681 | for (ii=0; ii < 8; ii++) | 4696 | for (ii=0; ii < 8; ii++) |
4682 | pReq->Reserved2[ii] = 0; | 4697 | pReq->Reserved2[ii] = 0; |
4683 | 4698 | ||
4684 | pReq->Header.PageVersion = pCfg->hdr->PageVersion; | 4699 | pReq->Header.PageVersion = pCfg->cfghdr.hdr->PageVersion; |
4685 | pReq->Header.PageLength = pCfg->hdr->PageLength; | 4700 | pReq->Header.PageLength = pCfg->cfghdr.hdr->PageLength; |
4686 | pReq->Header.PageNumber = pCfg->hdr->PageNumber; | 4701 | pReq->Header.PageNumber = pCfg->cfghdr.hdr->PageNumber; |
4687 | pReq->Header.PageType = (pCfg->hdr->PageType & MPI_CONFIG_PAGETYPE_MASK); | 4702 | pReq->Header.PageType = (pCfg->cfghdr.hdr->PageType & MPI_CONFIG_PAGETYPE_MASK); |
4703 | |||
4704 | if ((pCfg->cfghdr.hdr->PageType & MPI_CONFIG_PAGETYPE_MASK) == MPI_CONFIG_PAGETYPE_EXTENDED) { | ||
4705 | pExtHdr = (ConfigExtendedPageHeader_t *)pCfg->cfghdr.ehdr; | ||
4706 | pReq->ExtPageLength = cpu_to_le16(pExtHdr->ExtPageLength); | ||
4707 | pReq->ExtPageType = pExtHdr->ExtPageType; | ||
4708 | pReq->Header.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; | ||
4709 | |||
4710 | /* Page Length must be treated as a reserved field for the extended header. */ | ||
4711 | pReq->Header.PageLength = 0; | ||
4712 | } | ||
4713 | |||
4688 | pReq->PageAddress = cpu_to_le32(pCfg->pageAddr); | 4714 | pReq->PageAddress = cpu_to_le32(pCfg->pageAddr); |
4689 | 4715 | ||
4690 | /* Add a SGE to the config request. | 4716 | /* Add a SGE to the config request. |
@@ -4694,12 +4720,20 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg) | |||
4694 | else | 4720 | else |
4695 | flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; | 4721 | flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ; |
4696 | 4722 | ||
4697 | flagsLength |= pCfg->hdr->PageLength * 4; | 4723 | if ((pCfg->cfghdr.hdr->PageType & MPI_CONFIG_PAGETYPE_MASK) == MPI_CONFIG_PAGETYPE_EXTENDED) { |
4724 | flagsLength |= pExtHdr->ExtPageLength * 4; | ||
4698 | 4725 | ||
4699 | mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, pCfg->physAddr); | 4726 | dcprintk((MYIOC_s_INFO_FMT "Sending Config request type %d, page %d and action %d\n", |
4727 | ioc->name, pReq->ExtPageType, pReq->Header.PageNumber, pReq->Action)); | ||
4728 | } | ||
4729 | else { | ||
4730 | flagsLength |= pCfg->cfghdr.hdr->PageLength * 4; | ||
4700 | 4731 | ||
4701 | dcprintk((MYIOC_s_INFO_FMT "Sending Config request type %d, page %d and action %d\n", | 4732 | dcprintk((MYIOC_s_INFO_FMT "Sending Config request type %d, page %d and action %d\n", |
4702 | ioc->name, pReq->Header.PageType, pReq->Header.PageNumber, pReq->Action)); | 4733 | ioc->name, pReq->Header.PageType, pReq->Header.PageNumber, pReq->Action)); |
4734 | } | ||
4735 | |||
4736 | mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, pCfg->physAddr); | ||
4703 | 4737 | ||
4704 | /* Append pCfg pointer to end of mf | 4738 | /* Append pCfg pointer to end of mf |
4705 | */ | 4739 | */ |
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 848fb236b175..f4827d923731 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -915,7 +915,10 @@ struct scsi_cmnd; | |||
915 | typedef struct _x_config_parms { | 915 | typedef struct _x_config_parms { |
916 | struct list_head linkage; /* linked list */ | 916 | struct list_head linkage; /* linked list */ |
917 | struct timer_list timer; /* timer function for this request */ | 917 | struct timer_list timer; /* timer function for this request */ |
918 | ConfigPageHeader_t *hdr; | 918 | union { |
919 | ConfigExtendedPageHeader_t *ehdr; | ||
920 | ConfigPageHeader_t *hdr; | ||
921 | } cfghdr; | ||
919 | dma_addr_t physAddr; | 922 | dma_addr_t physAddr; |
920 | int wait_done; /* wait for this request */ | 923 | int wait_done; /* wait for this request */ |
921 | u32 pageAddr; /* properly formatted */ | 924 | u32 pageAddr; /* properly formatted */ |
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 05ea5944c487..e63a3fd6b706 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -2324,7 +2324,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) | |||
2324 | hdr.PageLength = 0; | 2324 | hdr.PageLength = 0; |
2325 | hdr.PageNumber = 0; | 2325 | hdr.PageNumber = 0; |
2326 | hdr.PageType = MPI_CONFIG_PAGETYPE_MANUFACTURING; | 2326 | hdr.PageType = MPI_CONFIG_PAGETYPE_MANUFACTURING; |
2327 | cfg.hdr = &hdr; | 2327 | cfg.cfghdr.hdr = &hdr; |
2328 | cfg.physAddr = -1; | 2328 | cfg.physAddr = -1; |
2329 | cfg.pageAddr = 0; | 2329 | cfg.pageAddr = 0; |
2330 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 2330 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
@@ -2333,7 +2333,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) | |||
2333 | 2333 | ||
2334 | strncpy(karg.serial_number, " ", 24); | 2334 | strncpy(karg.serial_number, " ", 24); |
2335 | if (mpt_config(ioc, &cfg) == 0) { | 2335 | if (mpt_config(ioc, &cfg) == 0) { |
2336 | if (cfg.hdr->PageLength > 0) { | 2336 | if (cfg.cfghdr.hdr->PageLength > 0) { |
2337 | /* Issue the second config page request */ | 2337 | /* Issue the second config page request */ |
2338 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; | 2338 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; |
2339 | 2339 | ||
@@ -2479,7 +2479,7 @@ mptctl_hp_targetinfo(unsigned long arg) | |||
2479 | hdr.PageNumber = 0; | 2479 | hdr.PageNumber = 0; |
2480 | hdr.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; | 2480 | hdr.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; |
2481 | 2481 | ||
2482 | cfg.hdr = &hdr; | 2482 | cfg.cfghdr.hdr = &hdr; |
2483 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; | 2483 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; |
2484 | cfg.dir = 0; | 2484 | cfg.dir = 0; |
2485 | cfg.timeout = 0; | 2485 | cfg.timeout = 0; |
@@ -2527,15 +2527,15 @@ mptctl_hp_targetinfo(unsigned long arg) | |||
2527 | hdr.PageNumber = 3; | 2527 | hdr.PageNumber = 3; |
2528 | hdr.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; | 2528 | hdr.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; |
2529 | 2529 | ||
2530 | cfg.hdr = &hdr; | 2530 | cfg.cfghdr.hdr = &hdr; |
2531 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; | 2531 | cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; |
2532 | cfg.dir = 0; | 2532 | cfg.dir = 0; |
2533 | cfg.timeout = 0; | 2533 | cfg.timeout = 0; |
2534 | cfg.physAddr = -1; | 2534 | cfg.physAddr = -1; |
2535 | if ((mpt_config(ioc, &cfg) == 0) && (cfg.hdr->PageLength > 0)) { | 2535 | if ((mpt_config(ioc, &cfg) == 0) && (cfg.cfghdr.hdr->PageLength > 0)) { |
2536 | /* Issue the second config page request */ | 2536 | /* Issue the second config page request */ |
2537 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; | 2537 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; |
2538 | data_sz = (int) cfg.hdr->PageLength * 4; | 2538 | data_sz = (int) cfg.cfghdr.hdr->PageLength * 4; |
2539 | pg3_alloc = (SCSIDevicePage3_t *) pci_alloc_consistent( | 2539 | pg3_alloc = (SCSIDevicePage3_t *) pci_alloc_consistent( |
2540 | ioc->pcidev, data_sz, &page_dma); | 2540 | ioc->pcidev, data_sz, &page_dma); |
2541 | if (pg3_alloc) { | 2541 | if (pg3_alloc) { |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index b9d4f78725b4..b774f45dfde4 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -3955,7 +3955,7 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, int portnum) | |||
3955 | header1.PageLength = ioc->spi_data.sdp1length; | 3955 | header1.PageLength = ioc->spi_data.sdp1length; |
3956 | header1.PageNumber = 1; | 3956 | header1.PageNumber = 1; |
3957 | header1.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; | 3957 | header1.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE; |
3958 | cfg.hdr = &header1; | 3958 | cfg.cfghdr.hdr = &header1; |
3959 | cfg.physAddr = cfg1_dma_addr; | 3959 | cfg.physAddr = cfg1_dma_addr; |
3960 | cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; | 3960 | cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; |
3961 | cfg.dir = 1; | 3961 | cfg.dir = 1; |
@@ -4353,7 +4353,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus_number, int id) | |||
4353 | /* Prep cfg structure | 4353 | /* Prep cfg structure |
4354 | */ | 4354 | */ |
4355 | cfg.pageAddr = (bus<<8) | id; | 4355 | cfg.pageAddr = (bus<<8) | id; |
4356 | cfg.hdr = NULL; | 4356 | cfg.cfghdr.hdr = NULL; |
4357 | 4357 | ||
4358 | /* Prep SDP0 header | 4358 | /* Prep SDP0 header |
4359 | */ | 4359 | */ |
@@ -4399,7 +4399,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus_number, int id) | |||
4399 | pcfg1Data = (SCSIDevicePage1_t *) (pDvBuf + sz); | 4399 | pcfg1Data = (SCSIDevicePage1_t *) (pDvBuf + sz); |
4400 | cfg1_dma_addr = dvbuf_dma + sz; | 4400 | cfg1_dma_addr = dvbuf_dma + sz; |
4401 | 4401 | ||
4402 | /* Skip this ID? Set cfg.hdr to force config page write | 4402 | /* Skip this ID? Set cfg.cfghdr.hdr to force config page write |
4403 | */ | 4403 | */ |
4404 | { | 4404 | { |
4405 | ScsiCfgData *pspi_data = &hd->ioc->spi_data; | 4405 | ScsiCfgData *pspi_data = &hd->ioc->spi_data; |
@@ -4417,7 +4417,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus_number, int id) | |||
4417 | 4417 | ||
4418 | dv.cmd = MPT_SET_MAX; | 4418 | dv.cmd = MPT_SET_MAX; |
4419 | mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); | 4419 | mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); |
4420 | cfg.hdr = &header1; | 4420 | cfg.cfghdr.hdr = &header1; |
4421 | 4421 | ||
4422 | /* Save the final negotiated settings to | 4422 | /* Save the final negotiated settings to |
4423 | * SCSI device page 1. | 4423 | * SCSI device page 1. |
@@ -4483,7 +4483,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus_number, int id) | |||
4483 | dv.cmd = MPT_SET_MIN; | 4483 | dv.cmd = MPT_SET_MIN; |
4484 | mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); | 4484 | mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data); |
4485 | 4485 | ||
4486 | cfg.hdr = &header1; | 4486 | cfg.cfghdr.hdr = &header1; |
4487 | cfg.physAddr = cfg1_dma_addr; | 4487 | cfg.physAddr = cfg1_dma_addr; |
4488 | cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; | 4488 | cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; |
4489 | cfg.dir = 1; | 4489 | cfg.dir = 1; |
@@ -4637,7 +4637,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus_number, int id) | |||
4637 | u32 sdp0_info; | 4637 | u32 sdp0_info; |
4638 | u32 sdp0_nego; | 4638 | u32 sdp0_nego; |
4639 | 4639 | ||
4640 | cfg.hdr = &header0; | 4640 | cfg.cfghdr.hdr = &header0; |
4641 | cfg.physAddr = cfg0_dma_addr; | 4641 | cfg.physAddr = cfg0_dma_addr; |
4642 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; | 4642 | cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; |
4643 | cfg.dir = 0; | 4643 | cfg.dir = 0; |
@@ -4722,7 +4722,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus_number, int id) | |||
4722 | * 4) release | 4722 | * 4) release |
4723 | * 5) update nego parms to target struct | 4723 | * 5) update nego parms to target struct |
4724 | */ | 4724 | */ |
4725 | cfg.hdr = &header1; | 4725 | cfg.cfghdr.hdr = &header1; |
4726 | cfg.physAddr = cfg1_dma_addr; | 4726 | cfg.physAddr = cfg1_dma_addr; |
4727 | cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; | 4727 | cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; |
4728 | cfg.dir = 1; | 4728 | cfg.dir = 1; |
@@ -5121,7 +5121,7 @@ target_done: | |||
5121 | 5121 | ||
5122 | /* Set if cfg1_dma_addr contents is valid | 5122 | /* Set if cfg1_dma_addr contents is valid |
5123 | */ | 5123 | */ |
5124 | if ((cfg.hdr != NULL) && (retcode == 0)){ | 5124 | if ((cfg.cfghdr.hdr != NULL) && (retcode == 0)){ |
5125 | /* If disk, not U320, disable QAS | 5125 | /* If disk, not U320, disable QAS |
5126 | */ | 5126 | */ |
5127 | if ((inq0 == 0) && (dv.now.factor > MPT_ULTRA320)) { | 5127 | if ((inq0 == 0) && (dv.now.factor > MPT_ULTRA320)) { |
@@ -5137,7 +5137,7 @@ target_done: | |||
5137 | * skip save of the final negotiated settings to | 5137 | * skip save of the final negotiated settings to |
5138 | * SCSI device page 1. | 5138 | * SCSI device page 1. |
5139 | * | 5139 | * |
5140 | cfg.hdr = &header1; | 5140 | cfg.cfghdr.hdr = &header1; |
5141 | cfg.physAddr = cfg1_dma_addr; | 5141 | cfg.physAddr = cfg1_dma_addr; |
5142 | cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; | 5142 | cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; |
5143 | cfg.dir = 1; | 5143 | cfg.dir = 1; |