aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.c
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsi.com>2007-01-29 11:42:20 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-02-02 21:48:49 -0500
commit793955f549c710a1b0c18f823d5d710840747b15 (patch)
treeef85a09c1d90404a83f95b35d6fd717c421a4e5b /drivers/message/fusion/mptbase.c
parent502c62f17aa7daa78d5da963305251b872885ff9 (diff)
[SCSI] fusion - Greater than 255 target and lun support
Add support for greater than 255 target and luns. Kill the hd->Target[] field, and change all references of bus_id/target_id, to channel/id. Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptbase.c')
-rw-r--r--drivers/message/fusion/mptbase.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index b3f28a03b6a9..a07f0f81f96b 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -82,6 +82,10 @@ static int mpt_msi_enable;
82module_param(mpt_msi_enable, int, 0); 82module_param(mpt_msi_enable, int, 0);
83MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)"); 83MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)");
84 84
85static int mpt_channel_mapping;
86module_param(mpt_channel_mapping, int, 0);
87MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)");
88
85#ifdef MFCNT 89#ifdef MFCNT
86static int mfcounter = 0; 90static int mfcounter = 0;
87#define PRINT_MF_COUNT 20000 91#define PRINT_MF_COUNT 20000
@@ -2505,6 +2509,7 @@ GetPortFacts(MPT_ADAPTER *ioc, int portnum, int sleepFlag)
2505 int ii; 2509 int ii;
2506 int req_sz; 2510 int req_sz;
2507 int reply_sz; 2511 int reply_sz;
2512 int max_id;
2508 2513
2509 /* IOC *must* NOT be in RESET state! */ 2514 /* IOC *must* NOT be in RESET state! */
2510 if (ioc->last_state == MPI_IOC_STATE_RESET) { 2515 if (ioc->last_state == MPI_IOC_STATE_RESET) {
@@ -2552,6 +2557,21 @@ GetPortFacts(MPT_ADAPTER *ioc, int portnum, int sleepFlag)
2552 pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs); 2557 pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs);
2553 pfacts->MaxLanBuckets = le16_to_cpu(pfacts->MaxLanBuckets); 2558 pfacts->MaxLanBuckets = le16_to_cpu(pfacts->MaxLanBuckets);
2554 2559
2560 max_id = (ioc->bus_type == SAS) ? pfacts->PortSCSIID :
2561 pfacts->MaxDevices;
2562 ioc->devices_per_bus = (max_id > 255) ? 256 : max_id;
2563 ioc->number_of_buses = (ioc->devices_per_bus < 256) ? 1 : max_id/256;
2564
2565 /*
2566 * Place all the devices on channels
2567 *
2568 * (for debuging)
2569 */
2570 if (mpt_channel_mapping) {
2571 ioc->devices_per_bus = 1;
2572 ioc->number_of_buses = (max_id > 255) ? 255 : max_id;
2573 }
2574
2555 return 0; 2575 return 0;
2556} 2576}
2557 2577
@@ -2592,13 +2612,8 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepFlag)
2592 ddlprintk((MYIOC_s_INFO_FMT "upload_fw %d facts.Flags=%x\n", 2612 ddlprintk((MYIOC_s_INFO_FMT "upload_fw %d facts.Flags=%x\n",
2593 ioc->name, ioc->upload_fw, ioc->facts.Flags)); 2613 ioc->name, ioc->upload_fw, ioc->facts.Flags));
2594 2614
2595 if(ioc->bus_type == SAS) 2615 ioc_init.MaxDevices = (U8)ioc->devices_per_bus;
2596 ioc_init.MaxDevices = ioc->facts.MaxDevices; 2616 ioc_init.MaxBuses = (U8)ioc->number_of_buses;
2597 else if(ioc->bus_type == FC)
2598 ioc_init.MaxDevices = MPT_MAX_FC_DEVICES;
2599 else
2600 ioc_init.MaxDevices = MPT_MAX_SCSI_DEVICES;
2601 ioc_init.MaxBuses = MPT_MAX_BUS;
2602 dinitprintk((MYIOC_s_INFO_FMT "facts.MsgVersion=%x\n", 2617 dinitprintk((MYIOC_s_INFO_FMT "facts.MsgVersion=%x\n",
2603 ioc->name, ioc->facts.MsgVersion)); 2618 ioc->name, ioc->facts.MsgVersion));
2604 if (ioc->facts.MsgVersion >= MPI_VERSION_01_05) { 2619 if (ioc->facts.MsgVersion >= MPI_VERSION_01_05) {