Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2019-06-06 10:40:58 +0200
committerHannes Reinecke <hare@suse.de>2019-06-06 10:41:06 +0200
commit842a9457ac3cf1e7afbcf9533fd1d8fa483d1c21 (patch)
treef9e83042004b910b7a0c8cc0b04f498c058475ee
parentb79868f2fbda40621e473eb8040eb8dc66a31b8c (diff)
scsi: qla2xxx: use lower_32_bits and upper_32_bits instead of
reinventing them (bsc#1137444).
-rw-r--r--patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch70
-rw-r--r--series.conf1
2 files changed, 71 insertions, 0 deletions
diff --git a/patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch b/patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch
new file mode 100644
index 0000000000..3abc19b803
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch
@@ -0,0 +1,70 @@
+From: Christoph Hellwig <hch@lst.de>
+Date: Thu, 18 Oct 2018 15:03:37 +0200
+Subject: [PATCH] scsi: qla2xxx: use lower_32_bits and upper_32_bits instead of
+ reinventing them
+Git-commit: 3d5ca1e6fdfeb4bc9d0b2eb4e35717198af03d78
+Patch-mainline: v5.0-rc1
+References: bsc#1137444
+
+This also moves the optimization for builds with 32-bit dma_addr_t to
+the compiler (where it belongs) instead of opencoding it based on
+incorrect assumptions.
+
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_target.c | 8 ++++----
+ drivers/scsi/qla2xxx/qla_target.h | 8 --------
+ 2 files changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
+index c4504740f0e2..bceb8e882e7f 100644
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -2660,9 +2660,9 @@ static void qlt_load_cont_data_segments(struct qla_tgt_prm *prm)
+ cnt < QLA_TGT_DATASEGS_PER_CONT_24XX && prm->seg_cnt;
+ cnt++, prm->seg_cnt--) {
+ *dword_ptr++ =
+- cpu_to_le32(pci_dma_lo32
++ cpu_to_le32(lower_32_bits
+ (sg_dma_address(prm->sg)));
+- *dword_ptr++ = cpu_to_le32(pci_dma_hi32
++ *dword_ptr++ = cpu_to_le32(upper_32_bits
+ (sg_dma_address(prm->sg)));
+ *dword_ptr++ = cpu_to_le32(sg_dma_len(prm->sg));
+
+@@ -2704,9 +2704,9 @@ static void qlt_load_data_segments(struct qla_tgt_prm *prm)
+ (cnt < QLA_TGT_DATASEGS_PER_CMD_24XX) && prm->seg_cnt;
+ cnt++, prm->seg_cnt--) {
+ *dword_ptr++ =
+- cpu_to_le32(pci_dma_lo32(sg_dma_address(prm->sg)));
++ cpu_to_le32(lower_32_bits(sg_dma_address(prm->sg)));
+
+- *dword_ptr++ = cpu_to_le32(pci_dma_hi32(
++ *dword_ptr++ = cpu_to_le32(upper_32_bits(
+ sg_dma_address(prm->sg)));
+
+ *dword_ptr++ = cpu_to_le32(sg_dma_len(prm->sg));
+diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
+index 721da593b1bc..577e1786a3f1 100644
+--- a/drivers/scsi/qla2xxx/qla_target.h
++++ b/drivers/scsi/qla2xxx/qla_target.h
+@@ -771,14 +771,6 @@ int qla2x00_wait_for_hba_online(struct scsi_qla_host *);
+ #define FC_TM_REJECT 4
+ #define FC_TM_FAILED 5
+
+-#if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
+-#define pci_dma_lo32(a) (a & 0xffffffff)
+-#define pci_dma_hi32(a) ((((a) >> 16)>>16) & 0xffffffff)
+-#else
+-#define pci_dma_lo32(a) (a & 0xffffffff)
+-#define pci_dma_hi32(a) 0
+-#endif
+-
+ #define QLA_TGT_SENSE_VALID(sense) ((sense != NULL) && \
+ (((const uint8_t *)(sense))[0] & 0x70) == 0x70)
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index b17219a3cf..96a6428218 100644
--- a/series.conf
+++ b/series.conf
@@ -20669,6 +20669,7 @@
patches.drivers/scsi-lpfc-Implement-GID_PT-on-Nameserver-query-to-su.patch
patches.drivers/scsi-lpfc-add-Trunking-support.patch
patches.drivers/scsi-lpfc-update-driver-version-to-12.0.0.8.patch
+ patches.drivers/scsi-qla2xxx-use-lower_32_bits-and-upper_32_bits-ins.patch
patches.fixes/scsi-target-add-emulate_pr-backstore-attr-to-toggle-.patch
patches.fixes/scsi-target-drop-unused-pi_prot_format-attribute-sto.patch
patches.drivers/scsi-csiostor-remove-flush_scheduled_work