diff options
author | Chris Zankel <chris@zankel.net> | 2014-02-24 03:34:36 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2014-02-24 03:34:36 -0500 |
commit | b3fdfc1b4b641d372e35ced98814289bc60bc5d1 (patch) | |
tree | 5f11d5ba885031dde45690745646519fb887f447 /drivers/scsi/mpt2sas | |
parent | c0e50d41126e4786d9cf1105bdf783e55c99f915 (diff) | |
parent | f63b6d7555cd4064554b39da4d44c4cbbc9d6a4a (diff) |
Merge tag 'xtensa-for-next-20140221-1' into for_next
Xtensa fixes for 3.14:
- allow booting xtfpga on boards with new uBoot and >128MBytes memory;
- drop nonexistent GPIO32 support from fsf variant;
- don't select USE_GENERIC_SMP_HELPERS;
- enable common clock framework support, set up ethoc clock on xtfpga;
- wire up sched_setattr and sched_getattr syscalls.
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_transport.c | 41 |
2 files changed, 22 insertions, 21 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 3901edc35812..bde63f7452bd 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -128,7 +128,7 @@ static int mpt2sas_remove_dead_ioc_func(void *arg) | |||
128 | pdev = ioc->pdev; | 128 | pdev = ioc->pdev; |
129 | if ((pdev == NULL)) | 129 | if ((pdev == NULL)) |
130 | return -1; | 130 | return -1; |
131 | pci_stop_and_remove_bus_device(pdev); | 131 | pci_stop_and_remove_bus_device_locked(pdev); |
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | 134 | ||
diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c index 9d26637308be..410f4a3e8888 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_transport.c +++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c | |||
@@ -1901,7 +1901,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1901 | struct MPT2SAS_ADAPTER *ioc = shost_priv(shost); | 1901 | struct MPT2SAS_ADAPTER *ioc = shost_priv(shost); |
1902 | Mpi2SmpPassthroughRequest_t *mpi_request; | 1902 | Mpi2SmpPassthroughRequest_t *mpi_request; |
1903 | Mpi2SmpPassthroughReply_t *mpi_reply; | 1903 | Mpi2SmpPassthroughReply_t *mpi_reply; |
1904 | int rc, i; | 1904 | int rc; |
1905 | u16 smid; | 1905 | u16 smid; |
1906 | u32 ioc_state; | 1906 | u32 ioc_state; |
1907 | unsigned long timeleft; | 1907 | unsigned long timeleft; |
@@ -1916,7 +1916,8 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1916 | void *pci_addr_out = NULL; | 1916 | void *pci_addr_out = NULL; |
1917 | u16 wait_state_count; | 1917 | u16 wait_state_count; |
1918 | struct request *rsp = req->next_rq; | 1918 | struct request *rsp = req->next_rq; |
1919 | struct bio_vec *bvec = NULL; | 1919 | struct bio_vec bvec; |
1920 | struct bvec_iter iter; | ||
1920 | 1921 | ||
1921 | if (!rsp) { | 1922 | if (!rsp) { |
1922 | printk(MPT2SAS_ERR_FMT "%s: the smp response space is " | 1923 | printk(MPT2SAS_ERR_FMT "%s: the smp response space is " |
@@ -1942,7 +1943,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1942 | ioc->transport_cmds.status = MPT2_CMD_PENDING; | 1943 | ioc->transport_cmds.status = MPT2_CMD_PENDING; |
1943 | 1944 | ||
1944 | /* Check if the request is split across multiple segments */ | 1945 | /* Check if the request is split across multiple segments */ |
1945 | if (bio_segments(req->bio) > 1) { | 1946 | if (bio_multiple_segments(req->bio)) { |
1946 | u32 offset = 0; | 1947 | u32 offset = 0; |
1947 | 1948 | ||
1948 | /* Allocate memory and copy the request */ | 1949 | /* Allocate memory and copy the request */ |
@@ -1955,11 +1956,11 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1955 | goto out; | 1956 | goto out; |
1956 | } | 1957 | } |
1957 | 1958 | ||
1958 | bio_for_each_segment(bvec, req->bio, i) { | 1959 | bio_for_each_segment(bvec, req->bio, iter) { |
1959 | memcpy(pci_addr_out + offset, | 1960 | memcpy(pci_addr_out + offset, |
1960 | page_address(bvec->bv_page) + bvec->bv_offset, | 1961 | page_address(bvec.bv_page) + bvec.bv_offset, |
1961 | bvec->bv_len); | 1962 | bvec.bv_len); |
1962 | offset += bvec->bv_len; | 1963 | offset += bvec.bv_len; |
1963 | } | 1964 | } |
1964 | } else { | 1965 | } else { |
1965 | dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio), | 1966 | dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio), |
@@ -1974,7 +1975,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1974 | 1975 | ||
1975 | /* Check if the response needs to be populated across | 1976 | /* Check if the response needs to be populated across |
1976 | * multiple segments */ | 1977 | * multiple segments */ |
1977 | if (bio_segments(rsp->bio) > 1) { | 1978 | if (bio_multiple_segments(rsp->bio)) { |
1978 | pci_addr_in = pci_alloc_consistent(ioc->pdev, blk_rq_bytes(rsp), | 1979 | pci_addr_in = pci_alloc_consistent(ioc->pdev, blk_rq_bytes(rsp), |
1979 | &pci_dma_in); | 1980 | &pci_dma_in); |
1980 | if (!pci_addr_in) { | 1981 | if (!pci_addr_in) { |
@@ -2041,7 +2042,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
2041 | sgl_flags = (MPI2_SGE_FLAGS_SIMPLE_ELEMENT | | 2042 | sgl_flags = (MPI2_SGE_FLAGS_SIMPLE_ELEMENT | |
2042 | MPI2_SGE_FLAGS_END_OF_BUFFER | MPI2_SGE_FLAGS_HOST_TO_IOC); | 2043 | MPI2_SGE_FLAGS_END_OF_BUFFER | MPI2_SGE_FLAGS_HOST_TO_IOC); |
2043 | sgl_flags = sgl_flags << MPI2_SGE_FLAGS_SHIFT; | 2044 | sgl_flags = sgl_flags << MPI2_SGE_FLAGS_SHIFT; |
2044 | if (bio_segments(req->bio) > 1) { | 2045 | if (bio_multiple_segments(req->bio)) { |
2045 | ioc->base_add_sg_single(psge, sgl_flags | | 2046 | ioc->base_add_sg_single(psge, sgl_flags | |
2046 | (blk_rq_bytes(req) - 4), pci_dma_out); | 2047 | (blk_rq_bytes(req) - 4), pci_dma_out); |
2047 | } else { | 2048 | } else { |
@@ -2057,7 +2058,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
2057 | MPI2_SGE_FLAGS_LAST_ELEMENT | MPI2_SGE_FLAGS_END_OF_BUFFER | | 2058 | MPI2_SGE_FLAGS_LAST_ELEMENT | MPI2_SGE_FLAGS_END_OF_BUFFER | |
2058 | MPI2_SGE_FLAGS_END_OF_LIST); | 2059 | MPI2_SGE_FLAGS_END_OF_LIST); |
2059 | sgl_flags = sgl_flags << MPI2_SGE_FLAGS_SHIFT; | 2060 | sgl_flags = sgl_flags << MPI2_SGE_FLAGS_SHIFT; |
2060 | if (bio_segments(rsp->bio) > 1) { | 2061 | if (bio_multiple_segments(rsp->bio)) { |
2061 | ioc->base_add_sg_single(psge, sgl_flags | | 2062 | ioc->base_add_sg_single(psge, sgl_flags | |
2062 | (blk_rq_bytes(rsp) + 4), pci_dma_in); | 2063 | (blk_rq_bytes(rsp) + 4), pci_dma_in); |
2063 | } else { | 2064 | } else { |
@@ -2102,23 +2103,23 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
2102 | le16_to_cpu(mpi_reply->ResponseDataLength); | 2103 | le16_to_cpu(mpi_reply->ResponseDataLength); |
2103 | /* check if the resp needs to be copied from the allocated | 2104 | /* check if the resp needs to be copied from the allocated |
2104 | * pci mem */ | 2105 | * pci mem */ |
2105 | if (bio_segments(rsp->bio) > 1) { | 2106 | if (bio_multiple_segments(rsp->bio)) { |
2106 | u32 offset = 0; | 2107 | u32 offset = 0; |
2107 | u32 bytes_to_copy = | 2108 | u32 bytes_to_copy = |
2108 | le16_to_cpu(mpi_reply->ResponseDataLength); | 2109 | le16_to_cpu(mpi_reply->ResponseDataLength); |
2109 | bio_for_each_segment(bvec, rsp->bio, i) { | 2110 | bio_for_each_segment(bvec, rsp->bio, iter) { |
2110 | if (bytes_to_copy <= bvec->bv_len) { | 2111 | if (bytes_to_copy <= bvec.bv_len) { |
2111 | memcpy(page_address(bvec->bv_page) + | 2112 | memcpy(page_address(bvec.bv_page) + |
2112 | bvec->bv_offset, pci_addr_in + | 2113 | bvec.bv_offset, pci_addr_in + |
2113 | offset, bytes_to_copy); | 2114 | offset, bytes_to_copy); |
2114 | break; | 2115 | break; |
2115 | } else { | 2116 | } else { |
2116 | memcpy(page_address(bvec->bv_page) + | 2117 | memcpy(page_address(bvec.bv_page) + |
2117 | bvec->bv_offset, pci_addr_in + | 2118 | bvec.bv_offset, pci_addr_in + |
2118 | offset, bvec->bv_len); | 2119 | offset, bvec.bv_len); |
2119 | bytes_to_copy -= bvec->bv_len; | 2120 | bytes_to_copy -= bvec.bv_len; |
2120 | } | 2121 | } |
2121 | offset += bvec->bv_len; | 2122 | offset += bvec.bv_len; |
2122 | } | 2123 | } |
2123 | } | 2124 | } |
2124 | } else { | 2125 | } else { |