* Re: [PATCH] wd33c93 updates [not found] <20030223153007.A9377@lst.de> @ 2003-02-24 15:40 ` James Bottomley 2003-02-24 19:07 ` Oliver Neukum 0 siblings, 1 reply; 3+ messages in thread From: James Bottomley @ 2003-02-24 15:40 UTC (permalink / raw) To: Christoph Hellwig; +Cc: SCSI Mailing List On Sun, 2003-02-23 at 09:30, Christoph Hellwig wrote: > The PC98 folks have some updates in their tree to make the generic > wd33c93 driver usable in PIO mode, but unfortunately the way they do it > (include a header specific to their lowlevel driver in wd33c93.c > conditionally) is rather ugly. OK much as I dislike looking at driver clean ups, this one stood out. We don't need each driver to get the command direction by parsing, the mid-layer now does it for you. James ===== drivers/scsi/wd33c93.c 1.8 vs edited ===== --- 1.8/drivers/scsi/wd33c93.c Sun Feb 23 09:24:23 2003 +++ edited/drivers/scsi/wd33c93.c Sun Feb 23 13:54:03 2003 @@ -304,44 +304,10 @@ * will be a DATA_OUT phase with this command, false otherwise. * (Thanks to Joerg Dorchain for the research and suggestion.) */ -static int +static inline int is_dir_out(Scsi_Cmnd * cmd) { - switch (cmd->cmnd[0]) { - case WRITE_6: - case WRITE_10: - case WRITE_12: - case WRITE_LONG: - case WRITE_SAME: - case WRITE_BUFFER: - case WRITE_VERIFY: - case WRITE_VERIFY_12: - case COMPARE: - case COPY: - case COPY_VERIFY: - case SEARCH_EQUAL: - case SEARCH_HIGH: - case SEARCH_LOW: - case SEARCH_EQUAL_12: - case SEARCH_HIGH_12: - case SEARCH_LOW_12: - case FORMAT_UNIT: - case REASSIGN_BLOCKS: - case RESERVE: - case MODE_SELECT: - case MODE_SELECT_10: - case LOG_SELECT: - case SEND_DIAGNOSTIC: - case CHANGE_DEFINITION: - case UPDATE_BLOCK: - case SET_WINDOW: - case MEDIUM_SCAN: - case SEND_VOLUME_TAG: - case 0xea: - return 1; - default: - return 0; - } + return cmd->sc_data_direction == SCSI_DATA_WRITE; } static struct sx_period sx_table[] = { ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wd33c93 updates 2003-02-24 15:40 ` [PATCH] wd33c93 updates James Bottomley @ 2003-02-24 19:07 ` Oliver Neukum 2003-02-24 19:17 ` James Bottomley 0 siblings, 1 reply; 3+ messages in thread From: Oliver Neukum @ 2003-02-24 19:07 UTC (permalink / raw) To: James Bottomley, Christoph Hellwig; +Cc: SCSI Mailing List Am Montag, 24. Februar 2003 16:40 schrieb James Bottomley: > On Sun, 2003-02-23 at 09:30, Christoph Hellwig wrote: > > The PC98 folks have some updates in their tree to make the generic > > wd33c93 driver usable in PIO mode, but unfortunately the way they do it > > (include a header specific to their lowlevel driver in wd33c93.c > > conditionally) is rather ugly. > > OK much as I dislike looking at driver clean ups, this one stood out. > We don't need each driver to get the command direction by parsing, the > mid-layer now does it for you. Hi, in all cases? And in which kernel versions? Regards Oliver ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wd33c93 updates 2003-02-24 19:07 ` Oliver Neukum @ 2003-02-24 19:17 ` James Bottomley 0 siblings, 0 replies; 3+ messages in thread From: James Bottomley @ 2003-02-24 19:17 UTC (permalink / raw) To: Oliver Neukum; +Cc: Christoph Hellwig, SCSI Mailing List On Mon, 2003-02-24 at 14:07, Oliver Neukum wrote: > Am Montag, 24. Februar 2003 16:40 schrieb James Bottomley: > > On Sun, 2003-02-23 at 09:30, Christoph Hellwig wrote: > > > The PC98 folks have some updates in their tree to make the generic > > > wd33c93 driver usable in PIO mode, but unfortunately the way they do it > > > (include a header specific to their lowlevel driver in wd33c93.c > > > conditionally) is rather ugly. > > > > OK much as I dislike looking at driver clean ups, this one stood out. > > We don't need each driver to get the command direction by parsing, the > > mid-layer now does it for you. > > Hi, > > in all cases? And in which kernel versions? Well, definitely all of 2.5 and most of 2.4. I think it was done early on in 2.3 actually as part of the Eric Youngdale clean ups, but I don't have the exact version to hand. James ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-02-24 19:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20030223153007.A9377@lst.de>
2003-02-24 15:40 ` [PATCH] wd33c93 updates James Bottomley
2003-02-24 19:07 ` Oliver Neukum
2003-02-24 19:17 ` James Bottomley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox