]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.drivers/qla2xxx-8.02.01-k9-update
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / qla2xxx-8.02.01-k9-update
1 From: Andrew Vasquez <andrew.vasquez@qlogic.com>
2 Subject: Update qla2xxx to 8.02.01-k9
3 References: bnc#439208
4 Patch-Mainline: 2.6.28
5
6 Since our last resync of SLES11 patches, We've since pushed upstream
7 another round of updates which we'd like pulled into the SLES11 tree.
8
9 Here's the upstream pull request:
10
11 [PATCH 0/5] qla2xxx: fixes for 2.6.28 [8.02.01-k9].
12 http://article.gmane.org/gmane.linux.scsi/45496
13
14 through the following commits:
15
16 qla2xxx: Correct Atmel flash-part handling.
17 qla2xxx: Use pci_disable_rom() to manipulate PCI config space.
18 qla2xxx: Do not honour max_vports from firmware for 2G ISPs and below.
19 qla2xxx: Return a FAILED status when abort mailbox-command fails.
20 qla2xxx: Update version number to 8.02.01-k9.
21
22 there's actually only 4 of the 5 which are applicable or SLES11:
23
24 qla2xxx: Correct Atmel flash-part handling.
25 http://article.gmane.org/gmane.linux.scsi/45495
26
27 qla2xxx: Do not honour max_vports from firmware for 2G ISPs and below.
28 http://article.gmane.org/gmane.linux.scsi/45498
29
30 qla2xxx: Return a FAILED status when abort mailbox-command fails.
31 http://article.gmane.org/gmane.linux.scsi/45494
32
33 qla2xxx: Update version number to 8.02.01-k9.
34 http://article.gmane.org/gmane.linux.scsi/45499
35
36 Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
37 Signed-off-by: Hannes Reinecke <hare@suse.de>
38
39 diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
40 index ab802e9..a45e333 100644
41 --- a/drivers/scsi/qla2xxx/qla_def.h
42 +++ b/drivers/scsi/qla2xxx/qla_def.h
43 @@ -2548,7 +2548,6 @@ typedef struct scsi_qla_host {
44 uint8_t fcode_revision[16];
45 uint32_t fw_revision[4];
46
47 - uint16_t fdt_odd_index;
48 uint32_t fdt_wrt_disable;
49 uint32_t fdt_erase_cmd;
50 uint32_t fdt_block_size;
51 diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
52 index a470f2d..ad2dd8c 100644
53 --- a/drivers/scsi/qla2xxx/qla_init.c
54 +++ b/drivers/scsi/qla2xxx/qla_init.c
55 @@ -980,7 +980,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
56 &ha->fw_minor_version,
57 &ha->fw_subminor_version,
58 &ha->fw_attributes, &ha->fw_memory_size);
59 - qla2x00_resize_request_q(ha);
60 ha->flags.npiv_supported = 0;
61 if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) ||
62 IS_QLA84XX(ha)) &&
63 @@ -992,6 +991,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
64 ha->max_npiv_vports =
65 MIN_MULTI_ID_FABRIC - 1;
66 }
67 + qla2x00_resize_request_q(ha);
68
69 if (ql2xallocfwdump)
70 qla2x00_alloc_fw_dump(ha);
71 diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
72 index 36bc685..3402746 100644
73 --- a/drivers/scsi/qla2xxx/qla_mbx.c
74 +++ b/drivers/scsi/qla2xxx/qla_mbx.c
75 @@ -1964,7 +1964,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt,
76 *cur_iocb_cnt = mcp->mb[7];
77 if (orig_iocb_cnt)
78 *orig_iocb_cnt = mcp->mb[10];
79 - if (max_npiv_vports)
80 + if (ha->flags.npiv_supported && max_npiv_vports)
81 *max_npiv_vports = mcp->mb[11];
82 }
83
84 diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
85 index 2aed472..4774acb 100644
86 --- a/drivers/scsi/qla2xxx/qla_os.c
87 +++ b/drivers/scsi/qla2xxx/qla_os.c
88 @@ -728,6 +728,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
89 if (ha->isp_ops->abort_command(ha, sp)) {
90 DEBUG2(printk("%s(%ld): abort_command "
91 "mbx failed.\n", __func__, ha->host_no));
92 + ret = FAILED;
93 } else {
94 DEBUG3(printk("%s(%ld): abort_command "
95 "mbx success.\n", __func__, ha->host_no));
96 diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
97 index e2432ef..6729a39 100644
98 --- a/drivers/scsi/qla2xxx/qla_sup.c
99 +++ b/drivers/scsi/qla2xxx/qla_sup.c
100 @@ -722,6 +722,7 @@ done:
101 static void
102 qla2xxx_get_fdt_info(scsi_qla_host_t *ha)
103 {
104 +#define FLASH_BLK_SIZE_4K 0x1000
105 #define FLASH_BLK_SIZE_32K 0x8000
106 #define FLASH_BLK_SIZE_64K 0x10000
107 const char *loc, *locations[] = { "MID", "FDT" };
108 @@ -755,7 +756,6 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *ha)
109 loc = locations[1];
110 mid = le16_to_cpu(fdt->man_id);
111 fid = le16_to_cpu(fdt->id);
112 - ha->fdt_odd_index = mid == 0x1f;
113 ha->fdt_wrt_disable = fdt->wrt_disable_bits;
114 ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd);
115 ha->fdt_block_size = le32_to_cpu(fdt->block_size);
116 @@ -788,8 +788,7 @@ no_flash_data:
117 ha->fdt_block_size = FLASH_BLK_SIZE_64K;
118 break;
119 case 0x1f: /* Atmel 26DF081A. */
120 - ha->fdt_odd_index = 1;
121 - ha->fdt_block_size = FLASH_BLK_SIZE_64K;
122 + ha->fdt_block_size = FLASH_BLK_SIZE_4K;
123 ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320);
124 ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339);
125 ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336);
126 @@ -801,9 +800,9 @@ no_flash_data:
127 }
128 done:
129 DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x "
130 - "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", loc, mid, fid,
131 + "pro=%x upro=%x wrtd=0x%x blk=0x%x.\n", loc, mid, fid,
132 ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd,
133 - ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable,
134 + ha->fdt_unprotect_sec_cmd, ha->fdt_wrt_disable,
135 ha->fdt_block_size));
136 }
137
138 @@ -985,13 +984,9 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr,
139 qla24xx_unprotect_flash(ha);
140
141 for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) {
142 - if (ha->fdt_odd_index) {
143 - findex = faddr << 2;
144 - fdata = findex & sec_mask;
145 - } else {
146 - findex = faddr;
147 - fdata = (findex & sec_mask) << 2;
148 - }
149 +
150 + findex = faddr;
151 + fdata = (findex & sec_mask) << 2;
152
153 /* Are we at the beginning of a sector? */
154 if ((findex & rest_addr) == 0) {
155 diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
156 index be5e299..eea6720 100644
157 --- a/drivers/scsi/qla2xxx/qla_version.h
158 +++ b/drivers/scsi/qla2xxx/qla_version.h
159 @@ -7,7 +7,7 @@
160 /*
161 * Driver version
162 */
163 -#define QLA2XXX_VERSION "8.02.01-k8"
164 +#define QLA2XXX_VERSION "8.02.01-k9"
165
166 #define QLA_DRIVER_MAJOR_VER 8
167 #define QLA_DRIVER_MINOR_VER 2