Skip to content

Commit 6f2689a

Browse files
committed
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI updates from James Bottomley: "This series consists of the usual driver updates (qla2xxx, pm8001, libsas, smartpqi, scsi_debug, lpfc, iscsi, mpi3mr) plus minor updates and bug fixes. The high blast radius core update is the removal of write same, which affects block and several non-SCSI devices. The other big change, which is more local, is the removal of the SCSI pointer" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (281 commits) scsi: scsi_ioctl: Drop needless assignment in sg_io() scsi: bsg: Drop needless assignment in scsi_bsg_sg_io_fn() scsi: lpfc: Copyright updates for 14.2.0.0 patches scsi: lpfc: Update lpfc version to 14.2.0.0 scsi: lpfc: SLI path split: Refactor BSG paths scsi: lpfc: SLI path split: Refactor Abort paths scsi: lpfc: SLI path split: Refactor SCSI paths scsi: lpfc: SLI path split: Refactor CT paths scsi: lpfc: SLI path split: Refactor misc ELS paths scsi: lpfc: SLI path split: Refactor VMID paths scsi: lpfc: SLI path split: Refactor FDISC paths scsi: lpfc: SLI path split: Refactor LS_RJT paths scsi: lpfc: SLI path split: Refactor LS_ACC paths scsi: lpfc: SLI path split: Refactor the RSCN/SCR/RDF/EDC/FARPR paths scsi: lpfc: SLI path split: Refactor PLOGI/PRLI/ADISC/LOGO paths scsi: lpfc: SLI path split: Refactor base ELS paths and the FLOGI path scsi: lpfc: SLI path split: Introduce lpfc_prep_wqe scsi: lpfc: SLI path split: Refactor fast and slow paths to native SLI4 scsi: lpfc: SLI path split: Refactor lpfc_iocbq scsi: lpfc: Use kcalloc() ...
2 parents b1f8ccd + 66daf3e commit 6f2689a

298 files changed

Lines changed: 8536 additions & 8334 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/scsi/libsas.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ Management Functions (TMFs) described in SAM::
207207
/* Task Management Functions. Must be called from process context. */
208208
int (*lldd_abort_task)(struct sas_task *);
209209
int (*lldd_abort_task_set)(struct domain_device *, u8 *lun);
210-
int (*lldd_clear_aca)(struct domain_device *, u8 *lun);
211210
int (*lldd_clear_task_set)(struct domain_device *, u8 *lun);
212211
int (*lldd_I_T_nexus_reset)(struct domain_device *);
213212
int (*lldd_lu_reset)(struct domain_device *, u8 *lun);
@@ -262,7 +261,6 @@ can look like this (called last thing from probe())
262261

263262
my_ha->sas_ha.lldd_abort_task = my_abort_task;
264263
my_ha->sas_ha.lldd_abort_task_set = my_abort_task_set;
265-
my_ha->sas_ha.lldd_clear_aca = my_clear_aca;
266264
my_ha->sas_ha.lldd_clear_task_set = my_clear_task_set;
267265
my_ha->sas_ha.lldd_I_T_nexus_reset= NULL; (2)
268266
my_ha->sas_ha.lldd_lu_reset = my_lu_reset;

Documentation/scsi/scsi_eh.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,18 @@ function
9595

9696
- BLK_EH_RESET_TIMER
9797
This indicates that more time is required to finish the
98-
command. Timer is restarted. This action is counted as a
99-
retry and only allowed scmd->allowed + 1(!) times. Once the
100-
limit is reached, action for BLK_EH_DONE is taken instead.
98+
command. Timer is restarted.
10199

102100
- BLK_EH_DONE
103101
eh_timed_out() callback did not handle the command.
104102
Step #2 is taken.
105103

106-
2. scsi_abort_command() is invoked to schedule an asynchrous abort.
107-
Asynchronous abort are not invoked for commands which the
108-
SCSI_EH_ABORT_SCHEDULED flag is set (this indicates that the command
109-
already had been aborted once, and this is a retry which failed),
110-
or when the EH deadline is expired. In these case Step #3 is taken.
104+
2. scsi_abort_command() is invoked to schedule an asynchronous abort which may
105+
issue a retry scmd->allowed + 1 times. Asynchronous aborts are not invoked
106+
for commands for which the SCSI_EH_ABORT_SCHEDULED flag is set (this
107+
indicates that the command already had been aborted once, and this is a
108+
retry which failed), when retries are exceeded, or when the EH deadline is
109+
expired. In these cases Step #3 is taken.
111110

112111
3. scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD) is invoked for the
113112
command. See [1-4] for more information.

Documentation/scsi/ufs.rst

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Universal Flash Storage
1010
1. Overview
1111
2. UFS Architecture Overview
1212
2.1 Application Layer
13-
2.2 UFS Transport Protocol(UTP) layer
14-
2.3 UFS Interconnect(UIC) Layer
13+
2.2 UFS Transport Protocol (UTP) layer
14+
2.3 UFS Interconnect (UIC) Layer
1515
3. UFSHCD Overview
1616
3.1 UFS controller initialization
1717
3.2 UTP Transfer requests
@@ -22,15 +22,15 @@ Universal Flash Storage
2222
1. Overview
2323
===========
2424

25-
Universal Flash Storage(UFS) is a storage specification for flash devices.
26-
It is aimed to provide a universal storage interface for both
27-
embedded and removable flash memory based storage in mobile
25+
Universal Flash Storage (UFS) is a storage specification for flash devices.
26+
It aims to provide a universal storage interface for both
27+
embedded and removable flash memory-based storage in mobile
2828
devices such as smart phones and tablet computers. The specification
2929
is defined by JEDEC Solid State Technology Association. UFS is based
30-
on MIPI M-PHY physical layer standard. UFS uses MIPI M-PHY as the
30+
on the MIPI M-PHY physical layer standard. UFS uses MIPI M-PHY as the
3131
physical layer and MIPI Unipro as the link layer.
3232

33-
The main goals of UFS is to provide:
33+
The main goals of UFS are to provide:
3434

3535
* Optimized performance:
3636

@@ -53,17 +53,17 @@ The main goals of UFS is to provide:
5353
UFS has a layered communication architecture which is based on SCSI
5454
SAM-5 architectural model.
5555

56-
UFS communication architecture consists of following layers,
56+
UFS communication architecture consists of the following layers.
5757

5858
2.1 Application Layer
5959
---------------------
6060

61-
The Application layer is composed of UFS command set layer(UCS),
61+
The Application layer is composed of the UFS command set layer (UCS),
6262
Task Manager and Device manager. The UFS interface is designed to be
6363
protocol agnostic, however SCSI has been selected as a baseline
64-
protocol for versions 1.0 and 1.1 of UFS protocol layer.
64+
protocol for versions 1.0 and 1.1 of the UFS protocol layer.
6565

66-
UFS supports subset of SCSI commands defined by SPC-4 and SBC-3.
66+
UFS supports a subset of SCSI commands defined by SPC-4 and SBC-3.
6767

6868
* UCS:
6969
It handles SCSI commands supported by UFS specification.
@@ -78,30 +78,30 @@ UFS communication architecture consists of following layers,
7878
requests which are used to modify and retrieve configuration
7979
information of the device.
8080

81-
2.2 UFS Transport Protocol(UTP) layer
82-
-------------------------------------
81+
2.2 UFS Transport Protocol (UTP) layer
82+
--------------------------------------
8383

84-
UTP layer provides services for
84+
The UTP layer provides services for
8585
the higher layers through Service Access Points. UTP defines 3
8686
service access points for higher layers.
8787

8888
* UDM_SAP: Device manager service access point is exposed to device
8989
manager for device level operations. These device level operations
9090
are done through query requests.
9191
* UTP_CMD_SAP: Command service access point is exposed to UFS command
92-
set layer(UCS) to transport commands.
92+
set layer (UCS) to transport commands.
9393
* UTP_TM_SAP: Task management service access point is exposed to task
9494
manager to transport task management functions.
9595

96-
UTP transports messages through UFS protocol information unit(UPIU).
96+
UTP transports messages through UFS protocol information unit (UPIU).
9797

98-
2.3 UFS Interconnect(UIC) Layer
99-
-------------------------------
98+
2.3 UFS Interconnect (UIC) Layer
99+
--------------------------------
100100

101-
UIC is the lowest layer of UFS layered architecture. It handles
102-
connection between UFS host and UFS device. UIC consists of
101+
UIC is the lowest layer of the UFS layered architecture. It handles
102+
the connection between UFS host and UFS device. UIC consists of
103103
MIPI UniPro and MIPI M-PHY. UIC provides 2 service access points
104-
to upper layer,
104+
to upper layer:
105105

106106
* UIC_SAP: To transport UPIU between UFS host and UFS device.
107107
* UIO_SAP: To issue commands to Unipro layers.
@@ -110,45 +110,45 @@ UFS communication architecture consists of following layers,
110110
3. UFSHCD Overview
111111
==================
112112

113-
The UFS host controller driver is based on Linux SCSI Framework.
114-
UFSHCD is a low level device driver which acts as an interface between
115-
SCSI Midlayer and PCIe based UFS host controllers.
113+
The UFS host controller driver is based on the Linux SCSI Framework.
114+
UFSHCD is a low-level device driver which acts as an interface between
115+
the SCSI Midlayer and PCIe-based UFS host controllers.
116116

117-
The current UFSHCD implementation supports following functionality,
117+
The current UFSHCD implementation supports the following functionality:
118118

119119
3.1 UFS controller initialization
120120
---------------------------------
121121

122-
The initialization module brings UFS host controller to active state
123-
and prepares the controller to transfer commands/response between
122+
The initialization module brings the UFS host controller to active state
123+
and prepares the controller to transfer commands/responses between
124124
UFSHCD and UFS device.
125125

126126
3.2 UTP Transfer requests
127127
-------------------------
128128

129129
Transfer request handling module of UFSHCD receives SCSI commands
130-
from SCSI Midlayer, forms UPIUs and issues the UPIUs to UFS Host
131-
controller. Also, the module decodes, responses received from UFS
130+
from the SCSI Midlayer, forms UPIUs and issues the UPIUs to the UFS Host
131+
controller. Also, the module decodes responses received from the UFS
132132
host controller in the form of UPIUs and intimates the SCSI Midlayer
133133
of the status of the command.
134134

135135
3.3 UFS error handling
136136
----------------------
137137

138138
Error handling module handles Host controller fatal errors,
139-
Device fatal errors and UIC interconnect layer related errors.
139+
Device fatal errors and UIC interconnect layer-related errors.
140140

141141
3.4 SCSI Error handling
142142
-----------------------
143143

144144
This is done through UFSHCD SCSI error handling routines registered
145-
with SCSI Midlayer. Examples of some of the error handling commands
146-
issues by SCSI Midlayer are Abort task, Lun reset and host reset.
145+
with the SCSI Midlayer. Examples of some of the error handling commands
146+
issues by the SCSI Midlayer are Abort task, LUN reset and host reset.
147147
UFSHCD Routines to perform these tasks are registered with
148148
SCSI Midlayer through .eh_abort_handler, .eh_device_reset_handler and
149149
.eh_host_reset_handler.
150150

151-
In this version of UFSHCD Query requests and power management
151+
In this version of UFSHCD, Query requests and power management
152152
functionality are not implemented.
153153

154154
4. BSG Support
@@ -182,14 +182,14 @@ If you wish to read or write a descriptor, use the appropriate xferp of
182182
sg_io_v4.
183183

184184
The userspace tool that interacts with the ufs-bsg endpoint and uses its
185-
upiu-based protocol is available at:
185+
UPIU-based protocol is available at:
186186

187187
https://github.com/westerndigitalcorporation/ufs-tool
188188

189189
For more detailed information about the tool and its supported
190190
features, please see the tool's README.
191191

192-
UFS Specifications can be found at:
192+
UFS specifications can be found at:
193193

194194
- UFS - http://www.jedec.org/sites/default/files/docs/JESD220.pdf
195195
- UFSHCI - http://www.jedec.org/sites/default/files/docs/JESD223.pdf

block/blk-core.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ static const char *const blk_op_name[] = {
123123
REQ_OP_NAME(ZONE_CLOSE),
124124
REQ_OP_NAME(ZONE_FINISH),
125125
REQ_OP_NAME(ZONE_APPEND),
126-
REQ_OP_NAME(WRITE_SAME),
127126
REQ_OP_NAME(WRITE_ZEROES),
128127
REQ_OP_NAME(DRV_IN),
129128
REQ_OP_NAME(DRV_OUT),
@@ -828,10 +827,6 @@ void submit_bio_noacct(struct bio *bio)
828827
if (!blk_queue_secure_erase(q))
829828
goto not_supported;
830829
break;
831-
case REQ_OP_WRITE_SAME:
832-
if (!q->limits.max_write_same_sectors)
833-
goto not_supported;
834-
break;
835830
case REQ_OP_ZONE_APPEND:
836831
status = blk_check_zone_append(q, bio);
837832
if (status != BLK_STS_OK)
@@ -903,13 +898,7 @@ void submit_bio(struct bio *bio)
903898
* go through the normal accounting stuff before submission.
904899
*/
905900
if (bio_has_data(bio)) {
906-
unsigned int count;
907-
908-
if (unlikely(bio_op(bio) == REQ_OP_WRITE_SAME))
909-
count = queue_logical_block_size(
910-
bdev_get_queue(bio->bi_bdev)) >> 9;
911-
else
912-
count = bio_sectors(bio);
901+
unsigned int count = bio_sectors(bio);
913902

914903
if (op_is_write(bio_op(bio))) {
915904
count_vm_events(PGPGOUT, count);

block/blk-lib.c

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -132,94 +132,6 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
132132
}
133133
EXPORT_SYMBOL(blkdev_issue_discard);
134134

135-
/**
136-
* __blkdev_issue_write_same - generate number of bios with same page
137-
* @bdev: target blockdev
138-
* @sector: start sector
139-
* @nr_sects: number of sectors to write
140-
* @gfp_mask: memory allocation flags (for bio_alloc)
141-
* @page: page containing data to write
142-
* @biop: pointer to anchor bio
143-
*
144-
* Description:
145-
* Generate and issue number of bios(REQ_OP_WRITE_SAME) with same page.
146-
*/
147-
static int __blkdev_issue_write_same(struct block_device *bdev, sector_t sector,
148-
sector_t nr_sects, gfp_t gfp_mask, struct page *page,
149-
struct bio **biop)
150-
{
151-
struct request_queue *q = bdev_get_queue(bdev);
152-
unsigned int max_write_same_sectors;
153-
struct bio *bio = *biop;
154-
sector_t bs_mask;
155-
156-
if (bdev_read_only(bdev))
157-
return -EPERM;
158-
159-
bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1;
160-
if ((sector | nr_sects) & bs_mask)
161-
return -EINVAL;
162-
163-
if (!bdev_write_same(bdev))
164-
return -EOPNOTSUPP;
165-
166-
/* Ensure that max_write_same_sectors doesn't overflow bi_size */
167-
max_write_same_sectors = bio_allowed_max_sectors(q);
168-
169-
while (nr_sects) {
170-
bio = blk_next_bio(bio, bdev, 1, REQ_OP_WRITE_SAME, gfp_mask);
171-
bio->bi_iter.bi_sector = sector;
172-
bio->bi_vcnt = 1;
173-
bio->bi_io_vec->bv_page = page;
174-
bio->bi_io_vec->bv_offset = 0;
175-
bio->bi_io_vec->bv_len = bdev_logical_block_size(bdev);
176-
177-
if (nr_sects > max_write_same_sectors) {
178-
bio->bi_iter.bi_size = max_write_same_sectors << 9;
179-
nr_sects -= max_write_same_sectors;
180-
sector += max_write_same_sectors;
181-
} else {
182-
bio->bi_iter.bi_size = nr_sects << 9;
183-
nr_sects = 0;
184-
}
185-
cond_resched();
186-
}
187-
188-
*biop = bio;
189-
return 0;
190-
}
191-
192-
/**
193-
* blkdev_issue_write_same - queue a write same operation
194-
* @bdev: target blockdev
195-
* @sector: start sector
196-
* @nr_sects: number of sectors to write
197-
* @gfp_mask: memory allocation flags (for bio_alloc)
198-
* @page: page containing data
199-
*
200-
* Description:
201-
* Issue a write same request for the sectors in question.
202-
*/
203-
int blkdev_issue_write_same(struct block_device *bdev, sector_t sector,
204-
sector_t nr_sects, gfp_t gfp_mask,
205-
struct page *page)
206-
{
207-
struct bio *bio = NULL;
208-
struct blk_plug plug;
209-
int ret;
210-
211-
blk_start_plug(&plug);
212-
ret = __blkdev_issue_write_same(bdev, sector, nr_sects, gfp_mask, page,
213-
&bio);
214-
if (ret == 0 && bio) {
215-
ret = submit_bio_wait(bio);
216-
bio_put(bio);
217-
}
218-
blk_finish_plug(&plug);
219-
return ret;
220-
}
221-
EXPORT_SYMBOL(blkdev_issue_write_same);
222-
223135
static int __blkdev_issue_write_zeroes(struct block_device *bdev,
224136
sector_t sector, sector_t nr_sects, gfp_t gfp_mask,
225137
struct bio **biop, unsigned flags)

0 commit comments

Comments
 (0)