Skip to content

Commit 4e8670e

Browse files
asaithambiaxboe
authored andcommitted
mtip32xx: removed the irrelevant argument of mtip_hw_submit_io() and the unused member of struct driver_data
Removed the following: * irrelevant argument 'barrier' of mtip_hw_submit_io() * unused member 'eh_active' of struct driver_data Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Sam Bradshaw <sbradshaw@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 11a3122 commit 4e8670e

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

‎drivers/block/mtip32xx/mtip32xx.c‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,16 +2068,14 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd,
20682068
* when the read completes.
20692069
* @data Callback data passed to the callback function
20702070
* when the read completes.
2071-
* @barrier If non-zero, this command must be completed before
2072-
* issuing any other commands.
20732071
* @dir Direction (read or write)
20742072
*
20752073
* return value
20762074
* None
20772075
*/
20782076
static void mtip_hw_submit_io(struct driver_data *dd, sector_t start,
20792077
int nsect, int nents, int tag, void *callback,
2080-
void *data, int barrier, int dir)
2078+
void *data, int dir)
20812079
{
20822080
struct host_to_dev_fis *fis;
20832081
struct mtip_port *port = dd->port;
@@ -2108,8 +2106,6 @@ static void mtip_hw_submit_io(struct driver_data *dd, sector_t start,
21082106
*((unsigned int *) &fis->lba_low) = (start & 0xFFFFFF);
21092107
*((unsigned int *) &fis->lba_low_ex) = ((start >> 24) & 0xFFFFFF);
21102108
fis->device = 1 << 6;
2111-
if (barrier)
2112-
fis->device |= FUA_BIT;
21132109
fis->features = nsect & 0xFF;
21142110
fis->features_ex = (nsect >> 8) & 0xFF;
21152111
fis->sect_count = ((tag << 3) | (tag >> 5));
@@ -3087,7 +3083,6 @@ static void mtip_make_request(struct request_queue *queue, struct bio *bio)
30873083
tag,
30883084
bio_endio,
30893085
bio,
3090-
bio->bi_rw & REQ_FUA,
30913086
bio_data_dir(bio));
30923087
} else
30933088
bio_io_error(bio);
@@ -3187,6 +3182,10 @@ static int mtip_block_initialize(struct driver_data *dd)
31873182
blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
31883183
blk_queue_physical_block_size(dd->queue, 4096);
31893184
blk_queue_io_min(dd->queue, 4096);
3185+
/*
3186+
* write back cache is not supported in the device. FUA depends on
3187+
* write back cache support, hence setting flush support to zero.
3188+
*/
31903189
blk_queue_flush(dd->queue, 0);
31913190

31923191
/* Set the capacity of the device in 512 byte sectors. */

‎drivers/block/mtip32xx/mtip32xx.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@
104104
/* BAR number used to access the HBA registers. */
105105
#define MTIP_ABAR 5
106106

107-
/* Forced Unit Access Bit */
108-
#define FUA_BIT 0x80
109-
110107
#ifdef DEBUG
111108
#define dbg_printk(format, arg...) \
112109
printk(pr_fmt(format), ##arg);
@@ -415,8 +412,6 @@ struct driver_data {
415412

416413
atomic_t resumeflag; /* Atomic variable to track suspend/resume */
417414

418-
atomic_t eh_active; /* Flag for error handling tracking */
419-
420415
struct task_struct *mtip_svc_handler; /* task_struct of svc thd */
421416
};
422417

0 commit comments

Comments
 (0)