소스 검색

[SCSI] osst: changes required to move forward to block request

On 02/07/2006 04:12:55 AM, Christoph Hellwig wrote:
> On Mon, Feb 06, 2006 at 08:02:21PM -0500, Willem Riede wrote:
>
> > But I will certainly help retire scsi_request. And anything else that is
> > needed to keep up with proper kernel style. Let me know what those are, if
> > you  would? I'll start looking at how st has changed, and will be back with
> > any  questions I may have.
>
> right now the above is the most urgent bit.  What would be nice but not
> required is a conversion to the sense handling helpers, similar to what
> st got (aka using the *normalize_sense functions and then dealing with the
> parsed sense buffer instead of the raw sense data)

Ok, so here is my first take at satisfying this request.
Be warned, that beyond compiling, and checking that the new module
doesn't immediately blow up, there hasn't yet been a lot of testing.

But this should allow you to comment on the changes, and move forward
with dropping scsi_request from the kernel code.

Signed-off-by: Willem Riede <osst@riede.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Willem Riede 19 년 전
부모
커밋
5e6575c051
2개의 변경된 파일251개의 추가작업 그리고 186개의 파일을 삭제
  1. 240 185
      drivers/scsi/osst.c
  2. 11 1
      drivers/scsi/osst.h

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 240 - 185
drivers/scsi/osst.c


+ 11 - 1
drivers/scsi/osst.h

@@ -518,7 +518,8 @@ struct osst_buffer {
   int writing;
   int midlevel_result;
   int syscall_result;
-  struct scsi_request *last_SRpnt;
+  struct osst_request *last_SRpnt;
+  struct st_cmdstatus cmdstat;
   unsigned char *b_data;
   os_aux_t *aux;               /* onstream AUX structure at end of each block     */
   unsigned short use_sg;       /* zero or number of s/g segments for this adapter */
@@ -626,6 +627,15 @@ struct osst_tape {
   struct gendisk *drive;
 } ;
 
+/* scsi tape command */
+struct osst_request {
+	unsigned char cmd[MAX_COMMAND_SIZE];
+	unsigned char sense[SCSI_SENSE_BUFFERSIZE];
+	int result;
+	struct osst_tape *stp;
+	struct completion *waiting;
+};
+
 /* Values of write_type */
 #define OS_WRITE_DATA      0
 #define OS_WRITE_EOD       1

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.