Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hpsa: avoid unnecessary readl on every command submission

for controllers which support either of the ioaccel transport methods.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reviewed-by: Mike Miller <michael.miller@canonical.com>
Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

authored by

Stephen M. Cameron and committed by
Christoph Hellwig
b3a52e79 094963da

+21 -1
+7
drivers/scsi/hpsa.c
··· 7330 7330 * 10 = 6 s/g entry or 24k 7331 7331 */ 7332 7332 7333 + /* If the controller supports either ioaccel method then 7334 + * we can also use the RAID stack submit path that does not 7335 + * perform the superfluous readl() after each command submission. 7336 + */ 7337 + if (trans_support & (CFGTBL_Trans_io_accel1 | CFGTBL_Trans_io_accel2)) 7338 + access = SA5_performant_access_no_read; 7339 + 7333 7340 /* Controller spec: zero out this buffer. */ 7334 7341 for (i = 0; i < h->nreply_queues; i++) 7335 7342 memset(h->reply_queue[i].head, 0, h->reply_queue_size);
+14 -1
drivers/scsi/hpsa.h
··· 346 346 (void) readl(h->vaddr + SA5_SCRATCHPAD_OFFSET); 347 347 } 348 348 349 + static void SA5_submit_command_no_read(struct ctlr_info *h, 350 + struct CommandList *c) 351 + { 352 + writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET); 353 + } 354 + 349 355 static void SA5_submit_command_ioaccel2(struct ctlr_info *h, 350 356 struct CommandList *c) 351 357 { ··· 359 353 writel(c->busaddr, h->vaddr + IOACCEL2_INBOUND_POSTQ_32); 360 354 else 361 355 writel(c->busaddr, h->vaddr + SA5_REQUEST_PORT_OFFSET); 362 - (void) readl(h->vaddr + SA5_SCRATCHPAD_OFFSET); 363 356 } 364 357 365 358 /* ··· 563 558 564 559 static struct access_method SA5_performant_access = { 565 560 SA5_submit_command, 561 + SA5_performant_intr_mask, 562 + SA5_fifo_full, 563 + SA5_performant_intr_pending, 564 + SA5_performant_completed, 565 + }; 566 + 567 + static struct access_method SA5_performant_access_no_read = { 568 + SA5_submit_command_no_read, 566 569 SA5_performant_intr_mask, 567 570 SA5_fifo_full, 568 571 SA5_performant_intr_pending,