hpsa.c (5ca0120447ae8d485e2ee5100f25b6645e3e320f) | hpsa.c (9a4178b76a973684750d20b684bae4f57ab9a355) |
---|---|
1/* 2 * Disk Array driver for HP Smart Array SAS controllers 3 * Copyright 2014-2015 PMC-Sierra, Inc. 4 * Copyright 2000,2009-2015 Hewlett-Packard Development Company, L.P. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; version 2 of the License. --- 1173 unchanged lines hidden (view full) --- 1182 if (hpsa_find_target_lun(h, device->scsi3addr, 1183 device->bus, &device->target, &device->lun) != 0) 1184 return -1; 1185 goto lun_assigned; 1186 } 1187 1188 /* This is a non-zero lun of a multi-lun device. 1189 * Search through our list and find the device which | 1/* 2 * Disk Array driver for HP Smart Array SAS controllers 3 * Copyright 2014-2015 PMC-Sierra, Inc. 4 * Copyright 2000,2009-2015 Hewlett-Packard Development Company, L.P. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; version 2 of the License. --- 1173 unchanged lines hidden (view full) --- 1182 if (hpsa_find_target_lun(h, device->scsi3addr, 1183 device->bus, &device->target, &device->lun) != 0) 1184 return -1; 1185 goto lun_assigned; 1186 } 1187 1188 /* This is a non-zero lun of a multi-lun device. 1189 * Search through our list and find the device which |
1190 * has the same 8 byte LUN address, excepting byte 4. | 1190 * has the same 8 byte LUN address, excepting byte 4 and 5. |
1191 * Assign the same bus and target for this new LUN. 1192 * Use the logical unit number from the firmware. 1193 */ 1194 memcpy(addr1, device->scsi3addr, 8); 1195 addr1[4] = 0; | 1191 * Assign the same bus and target for this new LUN. 1192 * Use the logical unit number from the firmware. 1193 */ 1194 memcpy(addr1, device->scsi3addr, 8); 1195 addr1[4] = 0; |
1196 addr1[5] = 0; |
|
1196 for (i = 0; i < n; i++) { 1197 sd = h->dev[i]; 1198 memcpy(addr2, sd->scsi3addr, 8); 1199 addr2[4] = 0; | 1197 for (i = 0; i < n; i++) { 1198 sd = h->dev[i]; 1199 memcpy(addr2, sd->scsi3addr, 8); 1200 addr2[4] = 0; |
1200 /* differ only in byte 4? */ | 1201 addr2[5] = 0; 1202 /* differ only in byte 4 and 5? */ |
1201 if (memcmp(addr1, addr2, 8) == 0) { 1202 device->bus = sd->bus; 1203 device->target = sd->target; 1204 device->lun = device->scsi3addr[4]; 1205 break; 1206 } 1207 } 1208 if (device->lun == -1) { --- 7646 unchanged lines hidden --- | 1203 if (memcmp(addr1, addr2, 8) == 0) { 1204 device->bus = sd->bus; 1205 device->target = sd->target; 1206 device->lun = device->scsi3addr[4]; 1207 break; 1208 } 1209 } 1210 if (device->lun == -1) { --- 7646 unchanged lines hidden --- |