]> git.pld-linux.org Git - packages/kernel.git/blob - 2.2.16combo
- this patch fix twice EXPORT_SYMBOL(br_ioctl_hook); in kernel-source net/netsyms.c
[packages/kernel.git] / 2.2.16combo
1 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/alpha/mm/fault.c linux.17p1/arch/alpha/mm/fault.c
2 --- linux.vanilla/arch/alpha/mm/fault.c Sun Jun 11 21:44:09 2000
3 +++ linux.17p1/arch/alpha/mm/fault.c    Sun Jun 11 21:54:08 2000
4 @@ -150,8 +150,8 @@
5         if ((fixup = search_exception_table(regs->pc, regs->gp)) != 0) {
6                 unsigned long newpc;
7                 newpc = fixup_exception(dpf_reg, fixup, regs->pc);
8 -#if 1
9 -               printk("%s: Exception at [<%lx>] (%lx) handled successfully.\n",
10 +#if 0
11 +               printk("%s: Exception at [<%lx>] (%lx)\n",
12                        current->comm, regs->pc, newpc);
13  #endif
14                 regs->pc = newpc;
15 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/ide-cd.c linux.17p1/drivers/block/ide-cd.c
16 --- linux.vanilla/drivers/block/ide-cd.c        Sun Jun 11 21:44:11 2000
17 +++ linux.17p1/drivers/block/ide-cd.c   Sun Jun 11 22:05:48 2000
18 @@ -1,8 +1,9 @@
19  /*
20 - * linux/drivers/block/ide-cd.c
21 + * linux/drivers/ide/ide-cd.c
22 + *
23   * Copyright (C) 1994, 1995, 1996  scott snyder  <snyder@fnald0.fnal.gov>
24   * Copyright (C) 1996-1998  Erik Andersen <andersee@debian.org>
25 - * Copyright (C) 1998-2000 Jens Axboe <axboe@suse.de>
26 + * Copyright (C) 1998-2000  Jens Axboe <axboe@suse.de>
27   *
28   * May be copied or modified under the terms of the GNU General Public
29   * License.  See linux/COPYING for more information.
30 @@ -271,15 +272,18 @@
31   *                     - Fixed a problem with WPI CDS-32X drive - it
32   *                       failed the capabilities 
33   *
34 - * 4.57 never happened
35 - *
36 - * 4.58 May 1, 2000    - Fixed possible oops in ide_cdrom_get_last_session()
37 + * 4.57  Apr 7, 2000   - Fixed sense reporting.
38 + *                     - Fixed possible oops in ide_cdrom_get_last_session()
39   *                     - Fix locking mania and make ide_cdrom_reset relock
40   *                     - Stop spewing errors to log when magicdev polls with
41   *                       TEST_UNIT_READY on some drives.
42 - *                     - Cleanup ACER50 stuff.
43 - *                     - Integrate the ide_cdrom_packet from 2.3 to
44 - *                       support DVD CSS ioctls.
45 + *                     - Various fixes from Tobias Ringstrom:
46 + *                       tray if it was locked prior to the reset.
47 + *                       - cdrom_read_capacity returns one frame too little.
48 + *                       - Fix real capacity reporting.
49 + *
50 + * 4.58  May 1, 2000   - Clean up ACER50 stuff.
51 + *                     - Fix small problem with ide_cdrom_capacity
52   *
53   *************************************************************************/
54   
55 @@ -309,7 +313,6 @@
56   * Generic packet command support and error handling routines.
57   */
58  
59 -
60  /* Mark that we've seen a media change, and invalidate our internal
61     buffers. */
62  static void cdrom_saw_media_change (ide_drive_t *drive)
63 @@ -323,8 +326,9 @@
64  
65  
66  static
67 -void cdrom_analyze_sense_data (ide_drive_t *drive, struct packet_command *pc,
68 -                               struct request_sense *sense)
69 +void cdrom_analyze_sense_data(ide_drive_t *drive,
70 +                             struct packet_command *failed_command,
71 +                             struct request_sense *sense)
72  {
73         if (sense->sense_key == NOT_READY ||
74             sense->sense_key == UNIT_ATTENTION) {
75 @@ -338,13 +342,12 @@
76                    READ_SUBCHANNEL.  Workman (and probably other programs)
77                    uses this command to poll the drive, and we don't want
78                    to fill the syslog with useless errors. */
79 -               if (pc && (pc->c[0] == GPCMD_READ_SUBCHANNEL))
80 +               if (failed_command &&
81 +                   (failed_command->c[0] == GPCMD_READ_SUBCHANNEL ||
82 +                    failed_command->c[0] == GPCMD_TEST_UNIT_READY))
83                         return;
84         }
85  
86 -       if (pc && (pc->c[0] == GPCMD_TEST_UNIT_READY))
87 -               return;
88 -
89         if (sense->error_code == 0x70 && sense->sense_key  == 0x02
90          && ((sense->asc      == 0x3a && sense->ascq       == 0x00) ||
91              (sense->asc      == 0x04 && sense->ascq       == 0x01)))
92 @@ -364,9 +367,9 @@
93                 char buf[80];
94  
95                 printk ("ATAPI device %s:\n", drive->name);
96 -               if (sense->error_code == 0x70)
97 +               if (sense->error_code==0x70)
98                         printk("  Error: ");
99 -               else if (sense->error_code == 0x71)
100 +               else if (sense->error_code==0x71)
101                         printk("  Deferred Error: ");
102                 else if (sense->error_code == 0x7f)
103                         printk("  Vendor-specific Error: ");
104 @@ -378,17 +381,17 @@
105                 else
106                         s = "bad sense key!";
107  
108 -               printk ("%s -- (Sense key=0x%02x)\n", s, sense->sense_key);
109 +               printk("%s -- (Sense key=0x%02x)\n", s, sense->sense_key);
110  
111                 if (sense->asc == 0x40) {
112 -                       sprintf (buf, "Diagnostic failure on component 0x%02x",
113 +                       sprintf(buf, "Diagnostic failure on component 0x%02x",
114                                  sense->ascq);
115                         s = buf;
116                 } else {
117 -                       int lo=0, mid, hi=ARY_LEN (sense_data_texts);
118 +                       int lo = 0, mid, hi = ARY_LEN(sense_data_texts);
119                         unsigned long key = (sense->sense_key << 16);
120                         key |= (sense->asc << 8);
121 -                       if ( ! (sense->ascq >= 0x80 && sense->ascq <= 0xdd) )
122 +                       if (!(sense->ascq >= 0x80 && sense->ascq <= 0xdd))
123                                 key |= sense->ascq;
124                         s = NULL;
125  
126 @@ -413,30 +416,32 @@
127                                 s = "(reserved error code)";
128                 }
129  
130 -               printk ("  %s -- (asc=0x%02x, ascq=0x%02x)\n",
131 +               printk("  %s -- (asc=0x%02x, ascq=0x%02x)\n",
132                         s, sense->asc, sense->ascq);
133  
134 -               if (pc != NULL) {
135 +               if (failed_command != NULL) {
136  
137                         int lo=0, mid, hi= ARY_LEN (packet_command_texts);
138                         s = NULL;
139  
140                         while (hi > lo) {
141                                 mid = (lo + hi) / 2;
142 -                               if (packet_command_texts[mid].packet_command == pc->c[0]) {
143 +                               if (packet_command_texts[mid].packet_command ==
144 +                                   failed_command->c[0]) {
145                                         s = packet_command_texts[mid].text;
146                                         break;
147                                 }
148 -                               else if (packet_command_texts[mid].packet_command > pc->c[0])
149 +                               if (packet_command_texts[mid].packet_command >
150 +                                   failed_command->c[0])
151                                         hi = mid;
152                                 else
153                                         lo = mid+1;
154                         }
155  
156                         printk ("  The failed \"%s\" packet command was: \n  \"", s);
157 -                       for (i = 0; i < sizeof(pc->c); i++)
158 -                               printk("%02x ", pc->c[i]);
159 -                       printk("\"\n");
160 +                       for (i=0; i<sizeof (failed_command->c); i++)
161 +                               printk ("%02x ", failed_command->c[i]);
162 +                       printk ("\"\n");
163                 }
164  
165                 /* The SKSV bit specifies validity of the sense_key_specific
166 @@ -452,7 +457,7 @@
167  
168                 if (sense->sense_key == ILLEGAL_REQUEST &&
169                     (sense->sks[0] & 0x80) != 0) {
170 -                       printk ("  Error in %s byte %d",
171 +                       printk("  Error in %s byte %d",
172                                 (sense->sks[0] & 0x40) != 0 ?
173                                 "command packet" : "command data",
174                                 (sense->sks[1] << 8) + sense->sks[2]);
175 @@ -460,7 +465,7 @@
176                         if ((sense->sks[0] & 0x40) != 0)
177                                 printk (" bit %d", sense->sks[0] & 0x07);
178  
179 -                       printk("\n");
180 +                       printk ("\n");
181                 }
182         }
183  
184 @@ -475,15 +480,16 @@
185                 return;
186  
187         printk("%s: error code: 0x%02x  sense_key: 0x%02x  asc: 0x%02x  ascq: 0x%02x\n",
188 -               drive->name, sense->error_code, sense->sense_key,
189 +               drive->name,
190 +               sense->error_code, sense->sense_key,
191                 sense->asc, sense->ascq);
192  #endif /* not VERBOSE_IDE_CD_ERRORS */
193  }
194  
195 -static void cdrom_queue_request_sense(ide_drive_t *drive,
196 +static void cdrom_queue_request_sense(ide_drive_t *drive, 
197                                       struct semaphore *sem,
198                                       struct request_sense *sense,
199 -                                     struct packet_command *failed_cmd)
200 +                                     struct packet_command *failed_command)
201  {
202         struct cdrom_info *info = drive->driver_data;
203         struct request *rq;
204 @@ -496,7 +502,7 @@
205         pc->c[0] = GPCMD_REQUEST_SENSE;
206         pc->c[4] = pc->buflen = 18;
207         pc->buffer = (char *) sense;
208 -       pc->sense = (struct request_sense *) failed_cmd;
209 +       pc->sense = (struct request_sense *) failed_command;
210  
211         /* stuff the sense request in front of our current request */
212         rq = &info->request_sense_request;
213 @@ -507,15 +513,16 @@
214         (void) ide_do_drive_cmd(drive, rq, ide_preempt);
215  }
216  
217 +
218  static void cdrom_end_request (int uptodate, ide_drive_t *drive)
219  {
220         struct request *rq = HWGROUP(drive)->rq;
221  
222         if (rq->cmd == REQUEST_SENSE_COMMAND && uptodate) {
223                 struct packet_command *pc = (struct packet_command *)rq->buffer;
224 -               cdrom_analyze_sense_data (drive,
225 +               cdrom_analyze_sense_data(drive,
226                         (struct packet_command *) pc->sense,
227 -                       (struct request_sense *) pc->buffer - pc->c[4]);
228 +                       (struct request_sense *) (pc->buffer - pc->c[4]));
229         }
230         if (rq->cmd == READ && !rq->current_nr_sectors)
231                 uptodate = 1;
232 @@ -654,6 +661,9 @@
233         struct packet_command *pc = (struct packet_command *) rq->buffer;
234         unsigned long wait = 0;
235  
236 +       /* blank and format can take an extremly long time to
237 +        * complete, if the IMMED bit was not set.
238 +        */
239         if (pc->c[0] == GPCMD_BLANK || pc->c[0] == GPCMD_FORMAT_UNIT)
240                 wait = 60*60*HZ;
241  
242 @@ -1066,15 +1076,15 @@
243                 (65534 / CD_FRAMESIZE) : 65535);
244  
245         /* Set up the command */
246 -       memset(&pc.c, 0, sizeof(pc.c));
247 +       memset (&pc.c, 0, sizeof (pc.c));
248         pc.c[0] = GPCMD_READ_10;
249         pc.c[7] = (nframes >> 8);
250         pc.c[8] = (nframes & 0xff);
251         put_unaligned(cpu_to_be32(frame), (unsigned int *) &pc.c[2]);
252  
253         /* Send the command to the drive and return. */
254 -       return cdrom_transfer_packet_command(drive, pc.c, sizeof (pc.c),
255 -                                             &cdrom_read_intr);
256 +       return cdrom_transfer_packet_command(drive, pc.c, sizeof(pc.c),
257 +                                            &cdrom_read_intr);
258  }
259  
260  
261 @@ -1190,20 +1200,20 @@
262                           struct request_sense *sense);
263  
264  /* Interrupt routine for packet command completion. */
265 -static ide_startstop_t cdrom_pc_intr(ide_drive_t *drive)
266 +static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
267  {
268         int ireason, len, stat, thislen;
269         struct request *rq = HWGROUP(drive)->rq;
270 -       struct packet_command *pc = (struct packet_command *) rq->buffer;
271 +       struct packet_command *pc = (struct packet_command *)rq->buffer;
272         ide_startstop_t startstop;
273  
274         /* Check for errors. */
275 -       if (cdrom_decode_status(&startstop, drive, 0, &stat))
276 +       if (cdrom_decode_status (&startstop, drive, 0, &stat))
277                 return startstop;
278  
279         /* Read the interrupt reason and the transfer length. */
280 -       ireason = IN_BYTE(IDE_NSECTOR_REG);
281 -       len = IN_BYTE(IDE_LCYL_REG) + 256 * IN_BYTE (IDE_HCYL_REG);
282 +       ireason = IN_BYTE (IDE_NSECTOR_REG);
283 +       len = IN_BYTE (IDE_LCYL_REG) + 256 * IN_BYTE (IDE_HCYL_REG);
284  
285         /* If DRQ is clear, the command has completed.
286            Complain if we still have data left to transfer. */
287 @@ -1242,14 +1252,14 @@
288         /* The drive wants to be written to. */
289         if ((ireason & 3) == 0) {
290                 /* Transfer the data. */
291 -               atapi_output_bytes(drive, pc->buffer, thislen);
292 +               atapi_output_bytes (drive, pc->buffer, thislen);
293  
294                 /* If we haven't moved enough data to satisfy the drive,
295                    add some padding. */
296                 while (len > thislen) {
297                         int dum = 0;
298 -                       atapi_output_bytes(drive, &dum, sizeof (dum));
299 -                       len -= sizeof(dum);
300 +                       atapi_output_bytes (drive, &dum, sizeof (dum));
301 +                       len -= sizeof (dum);
302                 }
303  
304                 /* Keep count of how much data we've moved. */
305 @@ -1261,28 +1271,28 @@
306         else if ((ireason & 3) == 2) {
307  
308                 /* Transfer the data. */
309 -               atapi_input_bytes(drive, pc->buffer, thislen);
310 +               atapi_input_bytes (drive, pc->buffer, thislen);
311  
312                 /* If we haven't moved enough data to satisfy the drive,
313                    add some padding. */
314                 while (len > thislen) {
315                         int dum = 0;
316 -                       atapi_input_bytes(drive, &dum, sizeof (dum));
317 -                       len -= sizeof(dum);
318 +                       atapi_input_bytes (drive, &dum, sizeof (dum));
319 +                       len -= sizeof (dum);
320                 }
321  
322                 /* Keep count of how much data we've moved. */
323                 pc->buffer += thislen;
324                 pc->buflen -= thislen;
325         } else {
326 -               printk("%s: cdrom_pc_intr: The drive "
327 +               printk ("%s: cdrom_pc_intr: The drive "
328                         "appears confused (ireason = 0x%2x)\n",
329                         drive->name, ireason);
330                 pc->stat = 1;
331         }
332  
333         /* Now we wait for another interrupt. */
334 -       ide_set_handler(drive, &cdrom_pc_intr, WAIT_CMD, cdrom_timer_expiry);
335 +       ide_set_handler (drive, &cdrom_pc_intr, WAIT_CMD, cdrom_timer_expiry);
336         return ide_started;
337  }
338  
339 @@ -1326,9 +1336,9 @@
340  static
341  int cdrom_queue_packet_command(ide_drive_t *drive, struct packet_command *pc)
342  {
343 -       int retries = 10;
344         struct request_sense sense;
345         struct request req;
346 +       int retries = 10;
347  
348         if (pc->sense == NULL)
349                 pc->sense = &sense;
350 @@ -1483,9 +1493,10 @@
351         struct cdrom_device_info *cdi = &info->devinfo;
352  
353         memset(&pc, 0, sizeof(pc));
354 -       pc.c[0] = GPCMD_TEST_UNIT_READY;
355         pc.sense = sense;
356  
357 +       pc.c[0] = GPCMD_TEST_UNIT_READY;
358 +
359  #if ! STANDARD_ATAPI
360          /* the Sanyo 3 CD changer uses byte 7 of TEST_UNIT_READY to 
361             switch CDs instead of supporting the LOAD_UNLOAD opcode   */
362 @@ -1509,13 +1520,13 @@
363                 sense = &my_sense;
364  
365         /* If the drive cannot lock the door, just pretend. */
366 -       if (CDROM_CONFIG_FLAGS (drive)->no_doorlock)
367 +       if (CDROM_CONFIG_FLAGS(drive)->no_doorlock) {
368                 stat = 0;
369 -       else {
370 +       } else {
371                 memset(&pc, 0, sizeof(pc));
372 -               pc.c[0] = GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL;
373 -               pc.c[4] = (lockflag != 0);
374                 pc.sense = sense;
375 +               pc.c[0] = GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL;
376 +               pc.c[4] = lockflag ? 1 : 0;
377                 stat = cdrom_queue_packet_command (drive, &pc);
378         }
379  
380 @@ -1544,7 +1555,7 @@
381  /* Eject the disk if EJECTFLAG is 0.
382     If EJECTFLAG is 1, try to reload the disk. */
383  static int cdrom_eject(ide_drive_t *drive, int ejectflag,
384 -                       struct request_sense *sense)
385 +                      struct request_sense *sense)
386  {
387         struct packet_command pc;
388  
389 @@ -1556,14 +1567,15 @@
390                 return 0;
391  
392         memset(&pc, 0, sizeof (pc));
393 +       pc.sense = sense;
394 +
395         pc.c[0] = GPCMD_START_STOP_UNIT;
396         pc.c[4] = 0x02 + (ejectflag != 0);
397 -       pc.sense = sense;
398         return cdrom_queue_packet_command (drive, &pc);
399  }
400  
401  static int cdrom_read_capacity(ide_drive_t *drive, unsigned *capacity,
402 -                               struct request_sense *sense)
403 +                              struct request_sense *sense)
404  {
405         struct {
406                 __u32 lba;
407 @@ -1573,16 +1585,16 @@
408         int stat;
409         struct packet_command pc;
410  
411 -       memset(&pc, 0, sizeof (pc));
412 +       memset(&pc, 0, sizeof(pc));
413 +       pc.sense = sense;
414  
415         pc.c[0] = GPCMD_READ_CDVD_CAPACITY;
416         pc.buffer = (char *)&capbuf;
417         pc.buflen = sizeof(capbuf);
418 -       pc.sense = sense;
419  
420         stat = cdrom_queue_packet_command(drive, &pc);
421         if (stat == 0)
422 -               *capacity = be32_to_cpu(capbuf.lba) + 1;
423 +               *capacity = 1 + be32_to_cpu(capbuf.lba);
424  
425         return stat;
426  }
427 @@ -1614,10 +1626,10 @@
428  /* Try to read the entire TOC for the disk into our internal buffer. */
429  static int cdrom_read_toc(ide_drive_t *drive, struct request_sense *sense)
430  {
431 -       int stat, ntracks, i;
432 +       int minor, stat, ntracks, i;
433 +       kdev_t dev;
434         struct cdrom_info *info = drive->driver_data;
435         struct atapi_toc *toc = info->toc;
436 -       int minor = drive->select.b.unit << PARTN_BITS;
437         struct {
438                 struct atapi_toc_header hdr;
439                 struct atapi_toc_entry  ent;
440 @@ -1625,7 +1637,7 @@
441  
442         if (toc == NULL) {
443                 /* Try to allocate space. */
444 -               toc = (struct atapi_toc *) kmalloc(sizeof(struct atapi_toc),
445 +               toc = (struct atapi_toc *) kmalloc (sizeof (struct atapi_toc),
446                                                     GFP_KERNEL);
447                 info->toc = toc;
448                 if (toc == NULL) {
449 @@ -1642,7 +1654,7 @@
450         if (CDROM_STATE_FLAGS (drive)->toc_valid) return 0;
451  
452         /* First read just the header, so we know how long the TOC is. */
453 -       stat = cdrom_read_tocentry (drive, 0, 1, 0, (char *)&toc->hdr,
454 +       stat = cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
455                                     sizeof(struct atapi_toc_header), sense);
456         if (stat) return stat;
457  
458 @@ -1654,14 +1666,17 @@
459  #endif  /* not STANDARD_ATAPI */
460  
461         ntracks = toc->hdr.last_track - toc->hdr.first_track + 1;
462 -       if (ntracks <= 0) return -EIO;
463 -       if (ntracks > MAX_TRACKS) ntracks = MAX_TRACKS;
464 +       if (ntracks <= 0)
465 +               return -EIO;
466 +       if (ntracks > MAX_TRACKS)
467 +               ntracks = MAX_TRACKS;
468  
469         /* Now read the whole schmeer. */
470 -       stat = cdrom_read_tocentry (drive, toc->hdr.first_track, 1, 0, (char *)&toc->hdr,
471 -                                   sizeof (struct atapi_toc_header) +
472 -                                   (ntracks + 1) *
473 -                                   sizeof (struct atapi_toc_entry), sense);
474 +       stat = cdrom_read_tocentry(drive, toc->hdr.first_track, 1, 0,
475 +                                 (char *)&toc->hdr,
476 +                                  sizeof(struct atapi_toc_header) +
477 +                                  (ntracks + 1) *
478 +                                  sizeof(struct atapi_toc_entry), sense);
479  
480         if (stat && toc->hdr.first_track > 1) {
481                 /* Cds with CDI tracks only don't have any TOC entries,
482 @@ -1674,12 +1689,12 @@
483                    the readable TOC is empty (CDI tracks are not included)
484                    and only holds the Leadout entry. Heiko Eißfeldt */
485                 ntracks = 0;
486 -               stat = cdrom_read_tocentry (drive, CDROM_LEADOUT, 1,
487 -                                           0, (char *)&toc->hdr,
488 -                                           sizeof (struct atapi_toc_header) +
489 -                                          (ntracks+1) *
490 -                                           sizeof (struct atapi_toc_entry),
491 -                                           sense);
492 +               stat = cdrom_read_tocentry(drive, CDROM_LEADOUT, 1, 0,
493 +                                          (char *)&toc->hdr,
494 +                                          sizeof(struct atapi_toc_header) +
495 +                                          (ntracks + 1) *
496 +                                          sizeof(struct atapi_toc_entry),
497 +                                          sense);
498                 if (stat) {
499                         return stat;
500                 }
501 @@ -1724,7 +1739,7 @@
502         if (toc->hdr.first_track != CDROM_LEADOUT) {
503                 /* Read the multisession information. */
504                 stat = cdrom_read_tocentry(drive, 0, 1, 1, (char *)&ms_tmp,
505 -                                          sizeof (ms_tmp), sense);
506 +                                          sizeof(ms_tmp), sense);
507                 if (stat) return stat;
508         } else {
509                 ms_tmp.ent.addr.msf.minute = 0;
510 @@ -1745,40 +1760,17 @@
511         toc->xa_flag = (ms_tmp.hdr.first_track != ms_tmp.hdr.last_track);
512  
513         /* Now try to get the total cdrom capacity. */
514 -#if 0
515 -       stat = cdrom_get_last_written(MKDEV(HWIF(drive)->major, minor),
516 -                                    (long *)&toc->capacity);
517 +       minor = (drive->select.b.unit) << PARTN_BITS;
518 +       dev = MKDEV(HWIF(drive)->major, minor);
519 +       stat = cdrom_get_last_written(dev, (long *)&toc->capacity);
520         if (stat)
521 -#endif
522 -       stat = cdrom_read_capacity(drive, &toc->capacity, sense);
523 -       if (stat) toc->capacity = 0x1fffff;
524 -
525 -       /* for general /dev/cdrom like mounting, one big disc */
526 -       drive->part[0].nr_sects = toc->capacity * SECTORS_PER_FRAME;
527 -       HWIF(drive)->gd->sizes[minor] = (toc->capacity * SECTORS_PER_FRAME) >>
528 -                                       (BLOCK_SIZE_BITS - 9);
529 +               stat = cdrom_read_capacity(drive, &toc->capacity, sense);
530 +       if (stat)
531 +               toc->capacity = 0x1fffff;
532  
533         /* Remember that we've read this stuff. */
534         CDROM_STATE_FLAGS (drive)->toc_valid = 1;
535  
536 -       /* should be "if multisession", but it does no harm. */
537 -       if (ntracks == 1)
538 -               return 0;
539 -
540 -       /* setup each minor to respond to a session */
541 -       minor++;
542 -       i = toc->hdr.first_track;
543 -       while ((i <= ntracks) && ((minor & CD_PART_MASK) < CD_PART_MAX)) {
544 -               drive->part[minor & PARTN_MASK].start_sect = 0;
545 -               drive->part[minor & PARTN_MASK].nr_sects =
546 -                       (toc->ent[i].addr.lba *
547 -                       SECTORS_PER_FRAME) << (BLOCK_SIZE_BITS - 9);
548 -               HWIF(drive)->gd->sizes[minor] = (toc->ent[i].addr.lba *
549 -                       SECTORS_PER_FRAME) >> (BLOCK_SIZE_BITS - 9);
550 -               i++;
551 -               minor++;
552 -       }
553 -
554         return 0;
555  }
556  
557 @@ -1821,9 +1813,8 @@
558         pc.c[2] = (speed >> 8) & 0xff;  
559         /* Read Drive speed in kbytes/second LSB */
560         pc.c[3] = speed & 0xff;
561 -       if (CDROM_CONFIG_FLAGS(drive)->cd_r ||
562 -            CDROM_CONFIG_FLAGS(drive)->cd_rw ||
563 -           CDROM_CONFIG_FLAGS(drive)->dvd_r) {
564 +       if ( CDROM_CONFIG_FLAGS(drive)->cd_r ||
565 +                   CDROM_CONFIG_FLAGS(drive)->cd_rw ) {
566                 /* Write Drive speed in kbytes/second MSB */
567                 pc.c[4] = (speed >> 8) & 0xff;
568                 /* Write Drive speed in kbytes/second LSB */
569 @@ -1874,14 +1865,18 @@
570         pc.buffer = cgc->buffer;
571         pc.buflen = cgc->buflen;
572         cgc->stat = cdrom_queue_packet_command(drive, &pc);
573 +
574 +       /*
575 +        * FIXME: copy sense, don't just assign pointer!!
576 +        */
577         cgc->sense = pc.sense;
578  
579         return cgc->stat;
580  }
581  
582  static
583 -int ide_cdrom_dev_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
584 -                       unsigned long arg)
585 +int ide_cdrom_dev_ioctl (struct cdrom_device_info *cdi,
586 +                        unsigned int cmd, unsigned long arg)
587  {
588         struct cdrom_generic_command cgc;
589         char buffer[16];
590 @@ -1977,18 +1972,19 @@
591  }
592  
593  static
594 -int ide_cdrom_reset(struct cdrom_device_info *cdi)
595 +int ide_cdrom_reset (struct cdrom_device_info *cdi)
596  {
597         ide_drive_t *drive = (ide_drive_t*) cdi->handle;
598         struct request_sense sense;
599         struct request req;
600         int ret;
601  
602 -       ide_init_drive_cmd(&req);
603 +       ide_init_drive_cmd (&req);
604         req.cmd = RESET_DRIVE_COMMAND;
605         ret = ide_do_drive_cmd(drive, &req, ide_wait);
606  
607 -       /* A reset will unlock the door. If it was previously locked,
608 +       /*
609 +        * A reset will unlock the door. If it was previously locked,
610          * lock it again.
611          */
612         if (CDROM_STATE_FLAGS(drive)->door_locked)
613 @@ -1999,7 +1995,7 @@
614  
615  
616  static
617 -int ide_cdrom_tray_move(struct cdrom_device_info *cdi, int position)
618 +int ide_cdrom_tray_move (struct cdrom_device_info *cdi, int position)
619  {
620         ide_drive_t *drive = (ide_drive_t*) cdi->handle;
621         struct request_sense sense;
622 @@ -2019,19 +2015,17 @@
623         return cdrom_lockdoor(drive, lock, NULL);
624  }
625  
626 -
627 -
628  static
629 -int ide_cdrom_select_speed(struct cdrom_device_info *cdi, int speed)
630 +int ide_cdrom_select_speed (struct cdrom_device_info *cdi, int speed)
631  {
632         ide_drive_t *drive = (ide_drive_t*) cdi->handle;
633         struct request_sense sense;
634         int stat;
635  
636 -       if ((stat = cdrom_select_speed(drive, speed, &sense)) < 0)
637 +       if ((stat = cdrom_select_speed (drive, speed, &sense)) < 0)
638                 return stat;
639  
640 -        cdi->speed = CDROM_STATE_FLAGS(drive)->current_speed;
641 +        cdi->speed = CDROM_STATE_FLAGS (drive)->current_speed;
642          return 0;
643  }
644  
645 @@ -2076,6 +2070,7 @@
646         if (!CDROM_STATE_FLAGS(drive)->toc_valid || toc == NULL)
647                 if ((ret = cdrom_read_toc(drive, &sense)))
648                         return ret;
649 +
650         ms_info->addr.lba = toc->last_session_lba;
651         ms_info->xa_flag = toc->xa_flag;
652  
653 @@ -2121,6 +2116,7 @@
654                 CDROM_STATE_FLAGS (drive)->media_changed = 0;
655                 return retval;
656         }
657 +
658         return -EINVAL;
659  }
660  
661 @@ -2175,9 +2171,9 @@
662  {
663         struct cdrom_info *info = drive->driver_data;
664         struct cdrom_device_info *devinfo = &info->devinfo;
665 -       int minor = (drive->select.b.unit)<<PARTN_BITS;
666 +       int minor = (drive->select.b.unit) << PARTN_BITS;
667  
668 -       devinfo->dev = MKDEV (HWIF(drive)->major, minor | CD_PART_MASK);
669 +       devinfo->dev = MKDEV (HWIF(drive)->major, minor);
670         devinfo->ops = &ide_cdrom_dops;
671         devinfo->mask = 0;
672         *(int *)&devinfo->speed = CDROM_STATE_FLAGS (drive)->current_speed;
673 @@ -2202,8 +2198,8 @@
674                 devinfo->mask |= CDC_PLAY_AUDIO;
675         if (!CDROM_CONFIG_FLAGS (drive)->close_tray)
676                 devinfo->mask |= CDC_CLOSE_TRAY;
677 -               
678 -       return register_cdrom (devinfo);
679 +
680 +       return register_cdrom(devinfo);
681  }
682  
683  static
684 @@ -2519,9 +2515,17 @@
685  static
686  int ide_cdrom_check_media_change (ide_drive_t *drive)
687  {
688 -       return cdrom_fops.check_media_change
689 -               (MKDEV (HWIF (drive)->major,
690 -                       (drive->select.b.unit)<<PARTN_BITS));
691 +       return cdrom_fops.check_media_change(MKDEV (HWIF (drive)->major,
692 +                       (drive->select.b.unit) << PARTN_BITS));
693 +}
694 +
695 +static
696 +unsigned long ide_cdrom_capacity (ide_drive_t *drive)
697 +{
698 +       unsigned capacity;
699 +
700 +       return cdrom_read_capacity(drive, &capacity, NULL)
701 +               ? 0 : capacity * SECTORS_PER_FRAME;
702  }
703  
704  static
705 @@ -2560,12 +2564,12 @@
706         ide_cdrom_release,              /* release */
707         ide_cdrom_check_media_change,   /* media_change */
708         NULL,                           /* pre_reset */
709 -       NULL,                           /* capacity */
710 +       ide_cdrom_capacity,             /* capacity */
711         NULL,                           /* special */
712         NULL                            /* proc */
713  };
714  
715 -int ide_cdrom_init (void);
716 +int ide_cdrom_init(void);
717  static ide_module_t ide_cdrom_module = {
718         IDE_DRIVER_MODULE,
719         ide_cdrom_init,
720 @@ -2597,9 +2601,10 @@
721  {
722         return ide_cdrom_init();
723  }
724 +
725  #endif /* MODULE */
726   
727 -int ide_cdrom_init (void)
728 +int ide_cdrom_init(void)
729  {
730         ide_drive_t *drive;
731         struct cdrom_info *info;
732 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/ide-cd.h linux.17p1/drivers/block/ide-cd.h
733 --- linux.vanilla/drivers/block/ide-cd.h        Sun Jun 11 21:44:12 2000
734 +++ linux.17p1/drivers/block/ide-cd.h   Sun Jun 11 22:27:29 2000
735 @@ -1,11 +1,11 @@
736 -#ifndef _IDE_CD_H
737 -#define _IDE_CD_H
738  /*
739 - *  linux/drivers/block/ide_cd.h
740 + *  linux/drivers/ide/ide_cd.h
741   *
742 - *  Copyright (C) 1996, 1997, 1998  Erik Andersen
743 - *  Copyright (C) 1998, 1999, 2000  Jens Axboe
744 + *  Copyright (C) 1996-98  Erik Andersen
745 + *  Copyright (C) 1998-2000 Jens Axboe
746   */
747 +#ifndef _IDE_CD_H
748 +#define _IDE_CD_H
749  
750  #include <linux/cdrom.h>
751  #include <asm/byteorder.h>
752 @@ -43,6 +43,8 @@
753  #define SECTOR_BUFFER_SIZE     (CD_FRAMESIZE * 32)
754  #define SECTORS_BUFFER         (SECTOR_BUFFER_SIZE / SECTOR_SIZE)
755  
756 +#define BLOCKS_PER_FRAME       (CD_FRAMESIZE / BLOCK_SIZE)
757 +
758  #define MIN(a,b) ((a) < (b) ? (a) : (b))
759  
760  /* special command codes for strategy routine. */
761 @@ -101,6 +103,7 @@
762         char *buffer;
763         int buflen;
764         int stat;
765 +       int quiet;
766         struct request_sense *sense;
767         unsigned char c[12];
768  };
769 @@ -397,7 +400,6 @@
770         unsigned short buffer_size;
771         /* Current speed (in kB/s). */
772         unsigned short curspeed;
773 -
774         char pad[4];
775  };
776  
777 @@ -624,9 +626,7 @@
778           "Logical unit not ready - in progress [sic] of becoming ready" },
779         { 0x020402, "Logical unit not ready - initializing command required" },
780         { 0x020403, "Logical unit not ready - manual intervention required" },
781 -       { 0x020404, "Logical unit not ready - format in progress" },
782 -       { 0x020407, "Logical unit not ready - operation in progress" },
783 -       { 0x020408, "Logical unit not ready - long write in progress" },
784 +       { 0x020404, "In process of becoming ready - writing" },
785         { 0x020600, "No reference position found (media may be upside down)" },
786         { 0x023000, "Incompatible medium installed" },
787         { 0x023a00, "Medium not present" },
788 @@ -676,6 +676,7 @@
789         { 0x04b600, "Media load mechanism failed" },
790         { 0x051a00, "Parameter list length error" },
791         { 0x052000, "Invalid command operation code" },
792 +       { 0x052c00, "Command sequence error" },
793         { 0x052100, "Logical block address out of range" },
794         { 0x052102, "Invalid address for write" },
795         { 0x052400, "Invalid field in command packet" },
796 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/cdrom/cdrom.c linux.17p1/drivers/cdrom/cdrom.c
797 --- linux.vanilla/drivers/cdrom/cdrom.c Sun Jun 11 21:44:12 2000
798 +++ linux.17p1/drivers/cdrom/cdrom.c    Sun Jun 11 22:05:48 2000
799 @@ -193,7 +193,7 @@
800  
801    3.07 Feb 2, 2000 - Jens Axboe <axboe@suse.de>
802    -- Do same "read header length" trick in cdrom_get_disc_info() as
803 -  we do in cdrom_get_track_info() -- some drive don't obbey specs and
804 +  we do in cdrom_get_track_info() -- some drive don't obey specs and
805    fail if they can't supply the full Mt Fuji size table.
806    -- Deleted stuff related to setting up write modes. It has a different
807    home now.
808 @@ -213,11 +213,16 @@
809    -- Fix Video-CD on SCSI drives that don't support READ_CD command. In
810    that case switch block size and issue plain READ_10 again, then switch
811    back.
812 +
813 +  3.09 Jun 10, 2000 - Jens Axboe <axboe@suse.de>
814 +  -- Fix volume control on CD's - old SCSI-II drives now use their own
815 +  code, as doing MODE6 stuff in here is really not my intention.
816 +  -- Use READ_DISC_INFO for more reliable end-of-disc.
817   
818  -------------------------------------------------------------------------*/
819  
820 -#define REVISION "Revision: 3.09"
821 -#define VERSION "Id: cdrom.c 3.09 2000/05/12"
822 +#define REVISION "Revision: 3.10"
823 +#define VERSION "Id: cdrom.c 3.10 2000/06/10"
824  
825  /* I use an error-log mask to give fine grain control over the type of
826     messages dumped to the system logs.  The available masks include: */
827 @@ -287,7 +292,7 @@
828  
829  /* The (cdo->capability & ~cdi->mask & CDC_XXX) construct was used in
830     a lot of places. This macro makes the code more clear. */
831 -#define CDROM_CAN(type) (cdi->ops->capability & ~cdi->mask & type)
832 +#define CDROM_CAN(type) (cdi->ops->capability & ~cdi->mask & (type))
833  
834  /* used in the audio ioctls */
835  #define CHECKAUDIO if ((ret=check_for_audio_disc(cdi, cdo))) return ret
836 @@ -1334,6 +1339,18 @@
837         return cdo->generic_packet(cdi, cgc);
838  }
839  
840 +static int cdrom_mode_select_6(struct cdrom_device_info *cdi,
841 +                              struct cdrom_generic_command *cgc)
842 +{
843 +       struct cdrom_device_ops *cdo = cdi->ops;
844 +
845 +       memset(cgc->cmd, 0, sizeof(cgc->cmd));
846 +       cgc->cmd[0] = GPCMD_MODE_SELECT_6;
847 +       cgc->cmd[1] = 0x10;
848 +       cgc->cmd[4] = cgc->buflen & 0xff;
849 +       return cdo->generic_packet(cdi, cgc);
850 +}
851 +
852  static int cdrom_read_subchannel(struct cdrom_device_info *cdi,
853                                  struct cdrom_subchnl *subchnl, int mcn)
854  {
855 @@ -1812,26 +1829,17 @@
856   */
857  static int cdrom_switch_blocksize(struct cdrom_device_info *cdi, int size)
858  {
859 -       struct cdrom_device_ops *cdo = cdi->ops;
860         struct cdrom_generic_command cgc;
861         struct modesel_head mh;
862  
863         memset(&mh, 0, sizeof(mh));
864 +       memset(&cgc, 0, sizeof(cgc));
865         mh.block_desc_length = 0x08;
866         mh.block_length_med = (size >> 8) & 0xff;
867         mh.block_length_lo = size & 0xff;
868 -
869 -       memset(&cgc, 0, sizeof(cgc));
870 -       cgc.cmd[0] = 0x15;
871 -       cgc.cmd[1] = 1 << 4;
872 -       cgc.cmd[4] = 12;
873         cgc.buflen = sizeof(mh);
874         cgc.buffer = (char *) &mh;
875 -       mh.block_desc_length = 0x08;
876 -       mh.block_length_med = (size >> 8) & 0xff;
877 -       mh.block_length_lo = size & 0xff;
878 -
879 -       return cdo->generic_packet(cdi, &cgc);
880 +       return cdrom_mode_select_6(cdi, &cgc);
881  }
882  
883  static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
884 @@ -2018,28 +2026,32 @@
885         case CDROMVOLREAD: {
886                 struct cdrom_volctrl volctrl;
887                 char mask[32];
888 -               unsigned short offset;
889 +               unsigned short offset = sizeof(struct mode_page_header);
890 +               struct mode_page_header *header = (struct mode_page_header *) buffer;
891 +               /*
892 +                * pass to sr vol control
893 +                */
894 +               if (cdi->scsi_2)
895 +                       return -ENOTTY;
896 +
897                 cdinfo(CD_DO_IOCTL, "entering CDROMVOLUME\n");
898  
899                 IOCTL_IN(arg, struct cdrom_volctrl, volctrl);
900  
901                 cgc.buffer = buffer;
902                 cgc.buflen = 24;
903 -               if ((ret = cdrom_mode_sense(cdi, &cgc, GPMODE_AUDIO_CTL_PAGE, 0)))
904 -                   return ret;
905 +               if ((ret = cdrom_mode_sense(cdi, &cgc, GPMODE_AUDIO_CTL_PAGE, 0))) {
906 +                       cdi->scsi_2 = 1;
907 +                       return ret;
908 +               }
909                 
910                 /* some drives have longer pages, adjust and reread. */
911 -               if (buffer[1] > cgc.buflen) {
912 -                       cgc.buflen = buffer[1] + 2;
913 -                       if ((ret = cdrom_mode_sense(cdi, &cgc, 
914 -                                       GPMODE_AUDIO_CTL_PAGE, 0))) 
915 -                           return ret;
916 +               if (be16_to_cpu(header->mode_data_length) != cgc.buflen + 2) {
917 +                       cgc.buflen = be16_to_cpu(header->mode_data_length) + 2;
918 +                       if ((ret = cdrom_mode_sense(cdi, &cgc, GPMODE_AUDIO_CTL_PAGE, 0))) 
919 +                               return ret;
920                 }
921                 
922 -               /* get the offset from the length of the page. length
923 -                  is measure from byte 2 an on, thus the 14. */
924 -               offset = buffer[1] - 14;
925 -
926                 /* now we have the current volume settings. if it was only
927                    a CDROMVOLREAD, return these values */
928                 if (cmd == CDROMVOLREAD) {
929 @@ -2053,9 +2065,8 @@
930                 
931                 /* get the volume mask */
932                 cgc.buffer = mask;
933 -               if ((ret = cdrom_mode_sense(cdi, &cgc, 
934 -                               GPMODE_AUDIO_CTL_PAGE, 1)))
935 -                   return ret;
936 +               if ((ret = cdrom_mode_sense(cdi, &cgc, GPMODE_AUDIO_CTL_PAGE, 1)))
937 +                       return ret;
938  
939                 buffer[offset+9] = volctrl.channel0 & mask[offset+9];
940                 buffer[offset+11] = volctrl.channel1 & mask[offset+11];
941 @@ -2252,6 +2263,9 @@
942         int ret = -1;
943  
944         if (!CDROM_CAN(CDC_GENERIC_PACKET))
945 +               goto use_toc;
946 +
947 +       if (!CDROM_CAN(CDC_CD_R | CDC_CD_RW))
948                 goto use_toc;
949  
950         if ((ret = cdrom_get_disc_info(dev, &di)))
951 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/i2o/i2o_core.c linux.17p1/drivers/i2o/i2o_core.c
952 --- linux.vanilla/drivers/i2o/i2o_core.c        Sun Jun 11 21:44:13 2000
953 +++ linux.17p1/drivers/i2o/i2o_core.c   Sun Jun 11 21:50:44 2000
954 @@ -3021,7 +3021,6 @@
955  extern int i2o_lan_init(void);
956  extern int i2o_pci_init(void);
957  extern int i2o_proc_init(void);
958 -extern int i2o_scsi_init(void);
959  
960  int __init i2o_init(void)
961  {
962 @@ -3063,10 +3062,6 @@
963  
964  #ifdef CONFIG_I2O_BLOCK
965         i2o_block_init();
966 -#endif
967 -
968 -#ifdef CONFIG_I2O_SCSI
969 -       i2o_scsi_init();
970  #endif
971  
972  #ifdef CONFIG_I2O_LAN
973 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/i2o/i2o_scsi.h linux.17p1/drivers/i2o/i2o_scsi.h
974 --- linux.vanilla/drivers/i2o/i2o_scsi.h        Wed May  3 22:34:53 2000
975 +++ linux.17p1/drivers/i2o/i2o_scsi.h   Sun Jun 11 22:38:04 2000
976 @@ -24,6 +24,7 @@
977  extern int i2o_scsi_reset(Scsi_Cmnd *, unsigned int);
978  extern int i2o_scsi_bios_param(Disk *, kdev_t, int *);
979  extern void i2o_scsi_setup(char *str, int *ints);
980 +extern int i2o_scsi_release(struct Scsi_Host *host);
981  
982  #define I2OSCSI {                                          \
983                   next: NULL,                               \
984 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/hosts.c linux.17p1/drivers/scsi/hosts.c
985 --- linux.vanilla/drivers/scsi/hosts.c  Fri Apr 21 12:46:28 2000
986 +++ linux.17p1/drivers/scsi/hosts.c     Sun Jun 11 21:50:44 2000
987 @@ -343,6 +343,10 @@
988  #include "3w-xxxx.h"
989  #endif
990  
991 +#ifdef CONFIG_I2O_SCSI
992 +#include "../i2o/i2o_scsi.h"
993 +#endif
994 +
995  /*
996   * Moved ppa driver to the end of the probe list
997   * since it is a removable host adapter.
998 @@ -617,7 +621,10 @@
999  #ifdef CONFIG_BLK_DEV_3W_XXXX_RAID
1000         TWXXXX,
1001  #endif
1002 -
1003 +/* Put I2O after specific adapters */
1004 +#ifdef CONFIG_I2O_SCSI
1005 +       I2OSCSI,
1006 +#endif
1007  /* "Removable host adapters" below this line (Parallel Port/USB/other) */
1008  #ifdef CONFIG_SCSI_PPA
1009      PPA,
1010 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/ini9100u.c linux.17p1/drivers/scsi/ini9100u.c
1011 --- linux.vanilla/drivers/scsi/ini9100u.c       Sun Jun 11 21:44:15 2000
1012 +++ linux.17p1/drivers/scsi/ini9100u.c  Sun Jun 11 22:00:50 2000
1013 @@ -545,8 +545,6 @@
1014  #if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(2,1,95)
1015                 pHCB->pSRB_lock = SPIN_LOCK_UNLOCKED;   /* SRB save queue lock */
1016  #endif
1017 -               request_region(pHCB->HCS_Base, 0x100, "i91u");  /* Register */
1018 -
1019                 get_tulipPCIConfig(pHCB, i);
1020  
1021                 dBiosAdr = pHCB->HCS_BIOS;
1022 @@ -557,6 +555,8 @@
1023  #endif
1024  
1025                 init_tulip(pHCB, tul_scb + (i * tul_num_scb), tul_num_scb, pbBiosAdr, 10);
1026 +               request_region(pHCB->HCS_Base, 256, "i91u"); /* Register */ 
1027 +
1028                 pHCB->HCS_Index = i;    /* 7/29/98 */
1029                 hreg = scsi_register(tpnt, sizeof(HCS));
1030                 hreg->io_port = pHCB->HCS_Base;
1031 @@ -1086,4 +1086,14 @@
1032  {
1033         printk("\ni91u_panic: %s\n", msg);
1034         panic("i91u panic");
1035 +}
1036 +
1037 +/*
1038 + * Release ressources
1039 + */
1040 +int i91u_release(struct Scsi_Host *hreg)
1041 +{
1042 +       free_irq(hreg->irq, hreg);
1043 +       release_region(hreg->io_port, 256);
1044 +       return 0;
1045  }
1046 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/ini9100u.h linux.17p1/drivers/scsi/ini9100u.h
1047 --- linux.vanilla/drivers/scsi/ini9100u.h       Wed May  3 22:31:20 2000
1048 +++ linux.17p1/drivers/scsi/ini9100u.h  Sun Jun 11 22:34:24 2000
1049 @@ -78,6 +78,7 @@
1050  #include "sd.h"
1051  
1052  extern int i91u_detect(Scsi_Host_Template *);
1053 +extern int i91u_release(struct Scsi_Host *);
1054  extern int i91u_command(Scsi_Cmnd *);
1055  extern int i91u_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
1056  extern int i91u_abort(Scsi_Cmnd *);
1057 @@ -148,7 +149,7 @@
1058         proc_info:      NULL,                           \
1059         name:           i91u_REVID, \
1060         detect:         i91u_detect, \
1061 -       release:        NULL, \
1062 +       release:        i91u_release, \
1063         info:           NULL,                                   \
1064         command:        i91u_command, \
1065         queuecommand:   i91u_queue, \
1066 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/inia100.c linux.17p1/drivers/scsi/inia100.c
1067 --- linux.vanilla/drivers/scsi/inia100.c        Fri Apr 21 12:46:28 2000
1068 +++ linux.17p1/drivers/scsi/inia100.c   Sun Jun 11 22:01:03 2000
1069 @@ -466,7 +466,6 @@
1070                 memset((unsigned char *) pHCB->HCS_virEscbArray, 0, sz);
1071                 pHCB->HCS_physEscbArray = (U32) VIRT_TO_BUS(pHCB->HCS_virEscbArray);
1072  
1073 -               request_region(pHCB->HCS_Base, 0x100, "inia100");       /* Register */
1074                 get_orcPCIConfig(pHCB, i);
1075  
1076                 dBiosAdr = pHCB->HCS_BIOS;
1077 @@ -480,6 +479,8 @@
1078                         printk("inia100: initial orchid fail!!\n");
1079                         return (0);
1080                 }
1081 +               request_region(pHCB->HCS_Base, 256, "inia100"); /* Register */
1082 +
1083                 hreg = scsi_register(tpnt, sizeof(ORC_HCS));
1084                 if (hreg == NULL) {
1085                         printk("Invalid scsi_register pointer.\n");
1086 @@ -512,28 +513,28 @@
1087                 switch (i) {
1088  #if LINUX_VERSION_CODE >= CVT_LINUX_VERSION(1,3,0)
1089                 case 0:
1090 -                       ok = request_irq(pHCB->HCS_Intr, inia100_intr0, SA_INTERRUPT | SA_SHIRQ, "inia100", NULL);
1091 +                       ok = request_irq(pHCB->HCS_Intr, inia100_intr0, SA_INTERRUPT | SA_SHIRQ, "inia100", hreg);
1092                         break;
1093                 case 1:
1094 -                       ok = request_irq(pHCB->HCS_Intr, inia100_intr1, SA_INTERRUPT | SA_SHIRQ, "inia100", NULL);
1095 +                       ok = request_irq(pHCB->HCS_Intr, inia100_intr1, SA_INTERRUPT | SA_SHIRQ, "inia100", hreg);
1096                         break;
1097                 case 2:
1098 -                       ok = request_irq(pHCB->HCS_Intr, inia100_intr2, SA_INTERRUPT | SA_SHIRQ, "inia100", NULL);
1099 +                       ok = request_irq(pHCB->HCS_Intr, inia100_intr2, SA_INTERRUPT | SA_SHIRQ, "inia100", hreg);
1100                         break;
1101                 case 3:
1102 -                       ok = request_irq(pHCB->HCS_Intr, inia100_intr3, SA_INTERRUPT | SA_SHIRQ, "inia100", NULL);
1103 +                       ok = request_irq(pHCB->HCS_Intr, inia100_intr3, SA_INTERRUPT | SA_SHIRQ, "inia100", hreg);
1104                         break;
1105                 case 4:
1106 -                       ok = request_irq(pHCB->HCS_Intr, inia100_intr4, SA_INTERRUPT | SA_SHIRQ, "inia100", NULL);
1107 +                       ok = request_irq(pHCB->HCS_Intr, inia100_intr4, SA_INTERRUPT | SA_SHIRQ, "inia100", hreg);
1108                         break;
1109                 case 5:
1110 -                       ok = request_irq(pHCB->HCS_Intr, inia100_intr5, SA_INTERRUPT | SA_SHIRQ, "inia100", NULL);
1111 +                       ok = request_irq(pHCB->HCS_Intr, inia100_intr5, SA_INTERRUPT | SA_SHIRQ, "inia100", hreg);
1112                         break;
1113                 case 6:
1114 -                       ok = request_irq(pHCB->HCS_Intr, inia100_intr6, SA_INTERRUPT | SA_SHIRQ, "inia100", NULL);
1115 +                       ok = request_irq(pHCB->HCS_Intr, inia100_intr6, SA_INTERRUPT | SA_SHIRQ, "inia100", hreg);
1116                         break;
1117                 case 7:
1118 -                       ok = request_irq(pHCB->HCS_Intr, inia100_intr7, SA_INTERRUPT | SA_SHIRQ, "inia100", NULL);
1119 +                       ok = request_irq(pHCB->HCS_Intr, inia100_intr7, SA_INTERRUPT | SA_SHIRQ, "inia100", hreg);
1120                         break;
1121                 default:
1122                         inia100_panic("inia100: Too many host adapters\n");
1123 @@ -936,5 +937,15 @@
1124         printk("\ninia100_panic: %s\n", msg);
1125         panic("inia100 panic");
1126  }
1127 +
1128 +/*
1129 + * Release ressources
1130 + */
1131 +int inia100_release(struct Scsi_Host *hreg)
1132 +{
1133 +        free_irq(hreg->irq, hreg);
1134 +        release_region(hreg->io_port, 256);
1135 +        return 0;
1136 +} 
1137  
1138  /*#include "inia100scsi.c" */
1139 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/inia100.h linux.17p1/drivers/scsi/inia100.h
1140 --- linux.vanilla/drivers/scsi/inia100.h        Wed May  3 22:31:20 2000
1141 +++ linux.17p1/drivers/scsi/inia100.h   Sun Jun 11 22:34:24 2000
1142 @@ -71,6 +71,7 @@
1143  #include "sd.h"
1144  
1145  extern int inia100_detect(Scsi_Host_Template *);
1146 +extern int inia100_release(struct Scsi_Host *);
1147  extern int inia100_command(Scsi_Cmnd *);
1148  extern int inia100_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
1149  extern int inia100_abort(Scsi_Cmnd *);
1150 @@ -142,7 +143,7 @@
1151         proc_info:      NULL,                           \
1152         name:           inia100_REVID, \
1153         detect:         inia100_detect, \
1154 -       release:        NULL, \
1155 +       release:        inia100_release, \
1156         info:           NULL,                                   \
1157         command:        inia100_command, \
1158         queuecommand:   inia100_queue, \
1159 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/sr_ioctl.c linux.17p1/drivers/scsi/sr_ioctl.c
1160 --- linux.vanilla/drivers/scsi/sr_ioctl.c       Sun Jun 11 21:44:17 2000
1161 +++ linux.17p1/drivers/scsi/sr_ioctl.c  Sun Jun 11 22:05:48 2000
1162 @@ -365,6 +365,98 @@
1163         
1164          break;
1165      }
1166 +       case CDROMVOLCTRL: {
1167 +               char * buffer, * mask;
1168 +               struct cdrom_volctrl* volctrl = (struct cdrom_volctrl*)arg;
1169 +       
1170 +       /* First we get the current params so we can just twiddle the volume */
1171 +               sr_cmd[0] = MODE_SENSE;
1172 +               sr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
1173 +               sr_cmd[2] = 0xe;    /* Want mode page 0xe, CDROM audio params */
1174 +               sr_cmd[3] = 0;
1175 +               sr_cmd[4] = 28;
1176 +               sr_cmd[5] = 0;
1177 +       
1178 +               if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
1179 +                       return -ENOMEM;
1180 +       
1181 +               if ((result = sr_do_ioctl(target, sr_cmd, buffer, 28, 0))) {
1182 +                       printk ("Hosed while obtaining audio mode page\n");
1183 +                       scsi_free(buffer, 512);
1184 +                       break;
1185 +               }
1186 +       
1187 +               sr_cmd[0] = MODE_SENSE;
1188 +               sr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
1189 +               sr_cmd[2] = 0x4e;   /* Want the mask for mode page 0xe */
1190 +               sr_cmd[3] = 0;
1191 +               sr_cmd[4] = 28;
1192 +               sr_cmd[5] = 0;
1193 +       
1194 +               mask = (unsigned char *) scsi_malloc(512);
1195 +               if(!mask) {
1196 +                       scsi_free(buffer, 512);
1197 +                       result = -ENOMEM;
1198 +                       break;
1199 +               }
1200 +
1201 +               if ((result = sr_do_ioctl (target, sr_cmd, mask, 28, 0))) {
1202 +                       printk("Hosed obtaining mask for audio mode page\n");
1203 +                       scsi_free(buffer, 512);
1204 +                       scsi_free(mask, 512);
1205 +                       break;
1206 +               }
1207 +       
1208 +               /* Now mask and substitute our own volume and reuse the rest */
1209 +               buffer[0] = 0;  /* Clear reserved field */
1210 +       
1211 +               buffer[21] = volctrl->channel0 & mask[21];
1212 +               buffer[23] = volctrl->channel1 & mask[23];
1213 +               buffer[25] = volctrl->channel2 & mask[25];
1214 +               buffer[27] = volctrl->channel3 & mask[27];
1215 +       
1216 +               sr_cmd[0] = MODE_SELECT;
1217 +               sr_cmd[1] = ((scsi_CDs[target].device -> lun) << 5) | 0x10;    /* Params are SCSI-2 */
1218 +               sr_cmd[2] = sr_cmd[3] = 0;
1219 +               sr_cmd[4] = 28;
1220 +               sr_cmd[5] = 0;
1221 +       
1222 +               result = sr_do_ioctl (target, sr_cmd, buffer, 28, 0);
1223 +               scsi_free(buffer, 512);
1224 +               scsi_free(mask, 512);
1225 +               break;
1226 +       }
1227 +       
1228 +       case CDROMVOLREAD: {
1229 +               char * buffer;
1230 +               struct cdrom_volctrl* volctrl = (struct cdrom_volctrl*)arg;
1231 +       
1232 +               /* Get the current params */
1233 +       
1234 +               sr_cmd[0] = MODE_SENSE;
1235 +               sr_cmd[1] = (scsi_CDs[target].device -> lun) << 5;
1236 +               sr_cmd[2] = 0xe;    /* Want mode page 0xe, CDROM audio params */
1237 +               sr_cmd[3] = 0;
1238 +               sr_cmd[4] = 28;
1239 +               sr_cmd[5] = 0;
1240 +       
1241 +               if ((buffer = (unsigned char *) scsi_malloc(512)) == NULL)
1242 +                       return -ENOMEM;
1243 +       
1244 +               if ((result = sr_do_ioctl (target, sr_cmd, buffer, 28, 0))) {
1245 +                       printk("(CDROMVOLREAD) Hosed while obtaining audio mode page\n");
1246 +                       scsi_free(buffer, 512);
1247 +                       break;
1248 +               }
1249 +
1250 +               volctrl->channel0 = buffer[21];
1251 +               volctrl->channel1 = buffer[23];
1252 +               volctrl->channel2 = buffer[25];
1253 +               volctrl->channel3 = buffer[27];
1254 +
1255 +               scsi_free(buffer, 512);
1256 +               break;
1257 +       }
1258  
1259      default:
1260          return -EINVAL;
1261 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sound/es1371.c linux.17p1/drivers/sound/es1371.c
1262 --- linux.vanilla/drivers/sound/es1371.c        Fri Apr 21 12:46:34 2000
1263 +++ linux.17p1/drivers/sound/es1371.c   Sun Jun 11 21:55:59 2000
1264 @@ -182,6 +182,7 @@
1265  #define CT5880REV_CT5880_C  0x02
1266  #define ES1371REV_ES1371_B  0x09
1267  #define EV1938REV_EV1938_A  0x00
1268 +#define ES1371REV_ES1373_8  0x08
1269  
1270  #define ES1371_MAGIC  ((PCI_VENDOR_ID_ENSONIQ<<16)|PCI_DEVICE_ID_ENSONIQ_ES1371)
1271  
1272 @@ -3166,7 +3167,8 @@
1273         /* if we are a 5880 turn on the AC97 */
1274         if (s->vendor == PCI_VENDOR_ID_ENSONIQ &&
1275             ((s->device == PCI_DEVICE_ID_ENSONIQ_CT5880 && s->rev == CT5880REV_CT5880_C) || 
1276 -            (s->device == PCI_DEVICE_ID_ENSONIQ_ES1371 && s->rev == ES1371REV_CT5880_A))) { 
1277 +            (s->device == PCI_DEVICE_ID_ENSONIQ_ES1371 && s->rev == ES1371REV_CT5880_A) || 
1278 +            (s->device == PCI_DEVICE_ID_ENSONIQ_ES1371 && s->rev == ES1371REV_ES1373_8))) { 
1279                 cssr |= CSTAT_5880_AC97_RST;
1280                 outl(cssr, s->io+ES1371_REG_STATUS);
1281                 /* need to delay around 20ms(bleech) to give
1282 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sound/ymf_sb.c linux.17p1/drivers/sound/ymf_sb.c
1283 --- linux.vanilla/drivers/sound/ymf_sb.c        Sun Jun 11 21:44:18 2000
1284 +++ linux.17p1/drivers/sound/ymf_sb.c   Sun Jun 11 21:54:57 2000
1285 @@ -822,7 +822,7 @@
1286         return;
1287  }
1288  
1289 -static int __init init_ymf7xxsb_module(void)
1290 +int __init init_ymf7xxsb_module(void)
1291  {
1292         if ( master_vol < 0 ) master_vol  = 50;
1293         if ( master_vol > 100 ) master_vol = 100;
1294 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/lockd/svc.c linux.17p1/fs/lockd/svc.c
1295 --- linux.vanilla/fs/lockd/svc.c        Fri Apr 21 12:46:43 2000
1296 +++ linux.17p1/fs/lockd/svc.c   Sun Jun 11 21:56:59 2000
1297 @@ -236,7 +236,10 @@
1298         }
1299  
1300         if ((error = svc_makesock(serv, IPPROTO_UDP, 0)) < 0 
1301 -        || (error = svc_makesock(serv, IPPROTO_TCP, 0)) < 0) {
1302 +#ifdef CONFIG_NFSD_TCP
1303 +        || (error = svc_makesock(serv, IPPROTO_TCP, 0)) < 0
1304 +#endif
1305 +               ) {
1306                 if (warned++ == 0) 
1307                         printk(KERN_WARNING
1308                                 "lockd_up: makesock failed, error=%d\n", error);
1309 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/cdrom.h linux.17p1/include/linux/cdrom.h
1310 --- linux.vanilla/include/linux/cdrom.h Sun Jun 11 21:44:23 2000
1311 +++ linux.17p1/include/linux/cdrom.h    Sun Jun 11 22:24:03 2000
1312 @@ -438,6 +438,8 @@
1313  #define GPCMD_MECHANISM_STATUS             0xbd
1314  #define GPCMD_MODE_SELECT_10               0x55
1315  #define GPCMD_MODE_SENSE_10                0x5a
1316 +#define GPCMD_MODE_SELECT_6                0x15
1317 +#define GPCMD_MODE_SENSE_6                 0x1a
1318  #define GPCMD_PAUSE_RESUME                 0x4b
1319  #define GPCMD_PLAY_AUDIO_10                0x45
1320  #define GPCMD_PLAY_AUDIO_MSF               0x47
1321 @@ -734,8 +736,8 @@
1322         char name[20];                  /* name of the device type */
1323  /* per-device flags */
1324          __u8 sanyo_slot                : 2;    /* Sanyo 3 CD changer support */
1325 -        __u8 reserved          : 6;    /* not used yet */
1326 -       struct cdrom_write_settings write;
1327 +        __u8 scsi_2            : 1;    /* strict SCSI-II device */
1328 +        __u8 reserved          : 5;    /* not used yet */
1329  };
1330  
1331  struct cdrom_device_ops {
1332 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/tcp_ipv4.c linux.17p1/net/ipv4/tcp_ipv4.c
1333 --- linux.vanilla/net/ipv4/tcp_ipv4.c   Fri Apr 21 12:47:15 2000
1334 +++ linux.17p1/net/ipv4/tcp_ipv4.c      Sun Jun 11 21:56:33 2000
1335 @@ -1041,8 +1041,8 @@
1336         rth.source = th->dest; 
1337         rth.doff = sizeof(struct tcphdr)/4;
1338  
1339 -       rth.seq = seq;
1340 -       rth.ack_seq = ack; 
1341 +       rth.seq = htonl(seq);
1342 +       rth.ack_seq = htonl(ack); 
1343         rth.ack = 1;
1344  
1345         rth.window = htons(window);
This page took 0.379311 seconds and 3 git commands to generate.