tape_34xx.c 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235
  1. /*
  2. * drivers/s390/char/tape_34xx.c
  3. * tape device discipline for 3480/3490 tapes.
  4. *
  5. * Copyright IBM Corp. 2001, 2009
  6. * Author(s): Carsten Otte <cotte@de.ibm.com>
  7. * Tuan Ngo-Anh <ngoanh@de.ibm.com>
  8. * Martin Schwidefsky <schwidefsky@de.ibm.com>
  9. */
  10. #define KMSG_COMPONENT "tape_34xx"
  11. #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
  12. #include <linux/module.h>
  13. #include <linux/init.h>
  14. #include <linux/bio.h>
  15. #include <linux/workqueue.h>
  16. #include <linux/slab.h>
  17. #define TAPE_DBF_AREA tape_34xx_dbf
  18. #include "tape.h"
  19. #include "tape_std.h"
  20. /*
  21. * Pointer to debug area.
  22. */
  23. debug_info_t *TAPE_DBF_AREA = NULL;
  24. EXPORT_SYMBOL(TAPE_DBF_AREA);
  25. #define TAPE34XX_FMT_3480 0
  26. #define TAPE34XX_FMT_3480_2_XF 1
  27. #define TAPE34XX_FMT_3480_XF 2
  28. struct tape_34xx_block_id {
  29. unsigned int wrap : 1;
  30. unsigned int segment : 7;
  31. unsigned int format : 2;
  32. unsigned int block : 22;
  33. };
  34. /*
  35. * A list of block ID's is used to faster seek blocks.
  36. */
  37. struct tape_34xx_sbid {
  38. struct list_head list;
  39. struct tape_34xx_block_id bid;
  40. };
  41. static void tape_34xx_delete_sbid_from(struct tape_device *, int);
  42. /*
  43. * Medium sense for 34xx tapes. There is no 'real' medium sense call.
  44. * So we just do a normal sense.
  45. */
  46. static void __tape_34xx_medium_sense(struct tape_request *request)
  47. {
  48. struct tape_device *device = request->device;
  49. unsigned char *sense;
  50. if (request->rc == 0) {
  51. sense = request->cpdata;
  52. /*
  53. * This isn't quite correct. But since INTERVENTION_REQUIRED
  54. * means that the drive is 'neither ready nor on-line' it is
  55. * only slightly inaccurate to say there is no tape loaded if
  56. * the drive isn't online...
  57. */
  58. if (sense[0] & SENSE_INTERVENTION_REQUIRED)
  59. tape_med_state_set(device, MS_UNLOADED);
  60. else
  61. tape_med_state_set(device, MS_LOADED);
  62. if (sense[1] & SENSE_WRITE_PROTECT)
  63. device->tape_generic_status |= GMT_WR_PROT(~0);
  64. else
  65. device->tape_generic_status &= ~GMT_WR_PROT(~0);
  66. } else
  67. DBF_EVENT(4, "tape_34xx: medium sense failed with rc=%d\n",
  68. request->rc);
  69. tape_free_request(request);
  70. }
  71. static int tape_34xx_medium_sense(struct tape_device *device)
  72. {
  73. struct tape_request *request;
  74. int rc;
  75. request = tape_alloc_request(1, 32);
  76. if (IS_ERR(request)) {
  77. DBF_EXCEPTION(6, "MSEN fail\n");
  78. return PTR_ERR(request);
  79. }
  80. request->op = TO_MSEN;
  81. tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);
  82. rc = tape_do_io_interruptible(device, request);
  83. __tape_34xx_medium_sense(request);
  84. return rc;
  85. }
  86. static void tape_34xx_medium_sense_async(struct tape_device *device)
  87. {
  88. struct tape_request *request;
  89. request = tape_alloc_request(1, 32);
  90. if (IS_ERR(request)) {
  91. DBF_EXCEPTION(6, "MSEN fail\n");
  92. return;
  93. }
  94. request->op = TO_MSEN;
  95. tape_ccw_end(request->cpaddr, SENSE, 32, request->cpdata);
  96. request->callback = (void *) __tape_34xx_medium_sense;
  97. request->callback_data = NULL;
  98. tape_do_io_async(device, request);
  99. }
  100. struct tape_34xx_work {
  101. struct tape_device *device;
  102. enum tape_op op;
  103. struct work_struct work;
  104. };
  105. /*
  106. * These functions are currently used only to schedule a medium_sense for
  107. * later execution. This is because we get an interrupt whenever a medium
  108. * is inserted but cannot call tape_do_io* from an interrupt context.
  109. * Maybe that's useful for other actions we want to start from the
  110. * interrupt handler.
  111. * Note: the work handler is called by the system work queue. The tape
  112. * commands started by the handler need to be asynchrounous, otherwise
  113. * a deadlock can occur e.g. in case of a deferred cc=1 (see __tape_do_irq).
  114. */
  115. static void
  116. tape_34xx_work_handler(struct work_struct *work)
  117. {
  118. struct tape_34xx_work *p =
  119. container_of(work, struct tape_34xx_work, work);
  120. struct tape_device *device = p->device;
  121. switch(p->op) {
  122. case TO_MSEN:
  123. tape_34xx_medium_sense_async(device);
  124. break;
  125. default:
  126. DBF_EVENT(3, "T34XX: internal error: unknown work\n");
  127. }
  128. tape_put_device(device);
  129. kfree(p);
  130. }
  131. static int
  132. tape_34xx_schedule_work(struct tape_device *device, enum tape_op op)
  133. {
  134. struct tape_34xx_work *p;
  135. if ((p = kzalloc(sizeof(*p), GFP_ATOMIC)) == NULL)
  136. return -ENOMEM;
  137. INIT_WORK(&p->work, tape_34xx_work_handler);
  138. p->device = tape_get_device(device);
  139. p->op = op;
  140. schedule_work(&p->work);
  141. return 0;
  142. }
  143. /*
  144. * Done Handler is called when dev stat = DEVICE-END (successful operation)
  145. */
  146. static inline int
  147. tape_34xx_done(struct tape_request *request)
  148. {
  149. DBF_EVENT(6, "%s done\n", tape_op_verbose[request->op]);
  150. switch (request->op) {
  151. case TO_DSE:
  152. case TO_RUN:
  153. case TO_WRI:
  154. case TO_WTM:
  155. case TO_ASSIGN:
  156. case TO_UNASSIGN:
  157. tape_34xx_delete_sbid_from(request->device, 0);
  158. break;
  159. default:
  160. ;
  161. }
  162. return TAPE_IO_SUCCESS;
  163. }
  164. static inline int
  165. tape_34xx_erp_failed(struct tape_request *request, int rc)
  166. {
  167. DBF_EVENT(3, "Error recovery failed for %s (RC=%d)\n",
  168. tape_op_verbose[request->op], rc);
  169. return rc;
  170. }
  171. static inline int
  172. tape_34xx_erp_succeeded(struct tape_request *request)
  173. {
  174. DBF_EVENT(3, "Error Recovery successful for %s\n",
  175. tape_op_verbose[request->op]);
  176. return tape_34xx_done(request);
  177. }
  178. static inline int
  179. tape_34xx_erp_retry(struct tape_request *request)
  180. {
  181. DBF_EVENT(3, "xerp retr %s\n", tape_op_verbose[request->op]);
  182. return TAPE_IO_RETRY;
  183. }
  184. /*
  185. * This function is called, when no request is outstanding and we get an
  186. * interrupt
  187. */
  188. static int
  189. tape_34xx_unsolicited_irq(struct tape_device *device, struct irb *irb)
  190. {
  191. if (irb->scsw.cmd.dstat == 0x85) { /* READY */
  192. /* A medium was inserted in the drive. */
  193. DBF_EVENT(6, "xuud med\n");
  194. tape_34xx_delete_sbid_from(device, 0);
  195. tape_34xx_schedule_work(device, TO_MSEN);
  196. } else {
  197. DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id);
  198. tape_dump_sense_dbf(device, NULL, irb);
  199. }
  200. return TAPE_IO_SUCCESS;
  201. }
  202. /*
  203. * Read Opposite Error Recovery Function:
  204. * Used, when Read Forward does not work
  205. */
  206. static int
  207. tape_34xx_erp_read_opposite(struct tape_device *device,
  208. struct tape_request *request)
  209. {
  210. if (request->op == TO_RFO) {
  211. /*
  212. * We did read forward, but the data could not be read
  213. * *correctly*. We transform the request to a read backward
  214. * and try again.
  215. */
  216. tape_std_read_backward(device, request);
  217. return tape_34xx_erp_retry(request);
  218. }
  219. /*
  220. * We tried to read forward and backward, but hat no
  221. * success -> failed.
  222. */
  223. return tape_34xx_erp_failed(request, -EIO);
  224. }
  225. static int
  226. tape_34xx_erp_bug(struct tape_device *device, struct tape_request *request,
  227. struct irb *irb, int no)
  228. {
  229. if (request->op != TO_ASSIGN) {
  230. dev_err(&device->cdev->dev, "An unexpected condition %d "
  231. "occurred in tape error recovery\n", no);
  232. tape_dump_sense_dbf(device, request, irb);
  233. }
  234. return tape_34xx_erp_failed(request, -EIO);
  235. }
  236. /*
  237. * Handle data overrun between cu and drive. The channel speed might
  238. * be too slow.
  239. */
  240. static int
  241. tape_34xx_erp_overrun(struct tape_device *device, struct tape_request *request,
  242. struct irb *irb)
  243. {
  244. if (irb->ecw[3] == 0x40) {
  245. dev_warn (&device->cdev->dev, "A data overrun occurred between"
  246. " the control unit and tape unit\n");
  247. return tape_34xx_erp_failed(request, -EIO);
  248. }
  249. return tape_34xx_erp_bug(device, request, irb, -1);
  250. }
  251. /*
  252. * Handle record sequence error.
  253. */
  254. static int
  255. tape_34xx_erp_sequence(struct tape_device *device,
  256. struct tape_request *request, struct irb *irb)
  257. {
  258. if (irb->ecw[3] == 0x41) {
  259. /*
  260. * cu detected incorrect block-id sequence on tape.
  261. */
  262. dev_warn (&device->cdev->dev, "The block ID sequence on the "
  263. "tape is incorrect\n");
  264. return tape_34xx_erp_failed(request, -EIO);
  265. }
  266. /*
  267. * Record sequence error bit is set, but erpa does not
  268. * show record sequence error.
  269. */
  270. return tape_34xx_erp_bug(device, request, irb, -2);
  271. }
  272. /*
  273. * This function analyses the tape's sense-data in case of a unit-check.
  274. * If possible, it tries to recover from the error. Else the user is
  275. * informed about the problem.
  276. */
  277. static int
  278. tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
  279. struct irb *irb)
  280. {
  281. int inhibit_cu_recovery;
  282. __u8* sense;
  283. inhibit_cu_recovery = (*device->modeset_byte & 0x80) ? 1 : 0;
  284. sense = irb->ecw;
  285. if (
  286. sense[0] & SENSE_COMMAND_REJECT &&
  287. sense[1] & SENSE_WRITE_PROTECT
  288. ) {
  289. if (
  290. request->op == TO_DSE ||
  291. request->op == TO_WRI ||
  292. request->op == TO_WTM
  293. ) {
  294. /* medium is write protected */
  295. return tape_34xx_erp_failed(request, -EACCES);
  296. } else {
  297. return tape_34xx_erp_bug(device, request, irb, -3);
  298. }
  299. }
  300. /*
  301. * Special cases for various tape-states when reaching
  302. * end of recorded area
  303. *
  304. * FIXME: Maybe a special case of the special case:
  305. * sense[0] == SENSE_EQUIPMENT_CHECK &&
  306. * sense[1] == SENSE_DRIVE_ONLINE &&
  307. * sense[3] == 0x47 (Volume Fenced)
  308. *
  309. * This was caused by continued FSF or FSR after an
  310. * 'End Of Data'.
  311. */
  312. if ((
  313. sense[0] == SENSE_DATA_CHECK ||
  314. sense[0] == SENSE_EQUIPMENT_CHECK ||
  315. sense[0] == SENSE_EQUIPMENT_CHECK + SENSE_DEFERRED_UNIT_CHECK
  316. ) && (
  317. sense[1] == SENSE_DRIVE_ONLINE ||
  318. sense[1] == SENSE_BEGINNING_OF_TAPE + SENSE_WRITE_MODE
  319. )) {
  320. switch (request->op) {
  321. /*
  322. * sense[0] == SENSE_DATA_CHECK &&
  323. * sense[1] == SENSE_DRIVE_ONLINE
  324. * sense[3] == 0x36 (End Of Data)
  325. *
  326. * Further seeks might return a 'Volume Fenced'.
  327. */
  328. case TO_FSF:
  329. case TO_FSB:
  330. /* Trying to seek beyond end of recorded area */
  331. return tape_34xx_erp_failed(request, -ENOSPC);
  332. case TO_BSB:
  333. return tape_34xx_erp_retry(request);
  334. /*
  335. * sense[0] == SENSE_DATA_CHECK &&
  336. * sense[1] == SENSE_DRIVE_ONLINE &&
  337. * sense[3] == 0x36 (End Of Data)
  338. */
  339. case TO_LBL:
  340. /* Block could not be located. */
  341. tape_34xx_delete_sbid_from(device, 0);
  342. return tape_34xx_erp_failed(request, -EIO);
  343. case TO_RFO:
  344. /* Read beyond end of recorded area -> 0 bytes read */
  345. return tape_34xx_erp_failed(request, 0);
  346. /*
  347. * sense[0] == SENSE_EQUIPMENT_CHECK &&
  348. * sense[1] == SENSE_DRIVE_ONLINE &&
  349. * sense[3] == 0x38 (Physical End Of Volume)
  350. */
  351. case TO_WRI:
  352. /* Writing at physical end of volume */
  353. return tape_34xx_erp_failed(request, -ENOSPC);
  354. default:
  355. return tape_34xx_erp_failed(request, 0);
  356. }
  357. }
  358. /* Sensing special bits */
  359. if (sense[0] & SENSE_BUS_OUT_CHECK)
  360. return tape_34xx_erp_retry(request);
  361. if (sense[0] & SENSE_DATA_CHECK) {
  362. /*
  363. * hardware failure, damaged tape or improper
  364. * operating conditions
  365. */
  366. switch (sense[3]) {
  367. case 0x23:
  368. /* a read data check occurred */
  369. if ((sense[2] & SENSE_TAPE_SYNC_MODE) ||
  370. inhibit_cu_recovery)
  371. // data check is not permanent, may be
  372. // recovered. We always use async-mode with
  373. // cu-recovery, so this should *never* happen.
  374. return tape_34xx_erp_bug(device, request,
  375. irb, -4);
  376. /* data check is permanent, CU recovery has failed */
  377. dev_warn (&device->cdev->dev, "A read error occurred "
  378. "that cannot be recovered\n");
  379. return tape_34xx_erp_failed(request, -EIO);
  380. case 0x25:
  381. // a write data check occurred
  382. if ((sense[2] & SENSE_TAPE_SYNC_MODE) ||
  383. inhibit_cu_recovery)
  384. // data check is not permanent, may be
  385. // recovered. We always use async-mode with
  386. // cu-recovery, so this should *never* happen.
  387. return tape_34xx_erp_bug(device, request,
  388. irb, -5);
  389. // data check is permanent, cu-recovery has failed
  390. dev_warn (&device->cdev->dev, "A write error on the "
  391. "tape cannot be recovered\n");
  392. return tape_34xx_erp_failed(request, -EIO);
  393. case 0x26:
  394. /* Data Check (read opposite) occurred. */
  395. return tape_34xx_erp_read_opposite(device, request);
  396. case 0x28:
  397. /* ID-Mark at tape start couldn't be written */
  398. dev_warn (&device->cdev->dev, "Writing the ID-mark "
  399. "failed\n");
  400. return tape_34xx_erp_failed(request, -EIO);
  401. case 0x31:
  402. /* Tape void. Tried to read beyond end of device. */
  403. dev_warn (&device->cdev->dev, "Reading the tape beyond"
  404. " the end of the recorded area failed\n");
  405. return tape_34xx_erp_failed(request, -ENOSPC);
  406. case 0x41:
  407. /* Record sequence error. */
  408. dev_warn (&device->cdev->dev, "The tape contains an "
  409. "incorrect block ID sequence\n");
  410. return tape_34xx_erp_failed(request, -EIO);
  411. default:
  412. /* all data checks for 3480 should result in one of
  413. * the above erpa-codes. For 3490, other data-check
  414. * conditions do exist. */
  415. if (device->cdev->id.driver_info == tape_3480)
  416. return tape_34xx_erp_bug(device, request,
  417. irb, -6);
  418. }
  419. }
  420. if (sense[0] & SENSE_OVERRUN)
  421. return tape_34xx_erp_overrun(device, request, irb);
  422. if (sense[1] & SENSE_RECORD_SEQUENCE_ERR)
  423. return tape_34xx_erp_sequence(device, request, irb);
  424. /* Sensing erpa codes */
  425. switch (sense[3]) {
  426. case 0x00:
  427. /* Unit check with erpa code 0. Report and ignore. */
  428. return TAPE_IO_SUCCESS;
  429. case 0x21:
  430. /*
  431. * Data streaming not operational. CU will switch to
  432. * interlock mode. Reissue the command.
  433. */
  434. return tape_34xx_erp_retry(request);
  435. case 0x22:
  436. /*
  437. * Path equipment check. Might be drive adapter error, buffer
  438. * error on the lower interface, internal path not usable,
  439. * or error during cartridge load.
  440. */
  441. dev_warn (&device->cdev->dev, "A path equipment check occurred"
  442. " for the tape device\n");
  443. return tape_34xx_erp_failed(request, -EIO);
  444. case 0x24:
  445. /*
  446. * Load display check. Load display was command was issued,
  447. * but the drive is displaying a drive check message. Can
  448. * be threated as "device end".
  449. */
  450. return tape_34xx_erp_succeeded(request);
  451. case 0x27:
  452. /*
  453. * Command reject. May indicate illegal channel program or
  454. * buffer over/underrun. Since all channel programs are
  455. * issued by this driver and ought be correct, we assume a
  456. * over/underrun situation and retry the channel program.
  457. */
  458. return tape_34xx_erp_retry(request);
  459. case 0x29:
  460. /*
  461. * Function incompatible. Either the tape is idrc compressed
  462. * but the hardware isn't capable to do idrc, or a perform
  463. * subsystem func is issued and the CU is not on-line.
  464. */
  465. return tape_34xx_erp_failed(request, -EIO);
  466. case 0x2a:
  467. /*
  468. * Unsolicited environmental data. An internal counter
  469. * overflows, we can ignore this and reissue the cmd.
  470. */
  471. return tape_34xx_erp_retry(request);
  472. case 0x2b:
  473. /*
  474. * Environmental data present. Indicates either unload
  475. * completed ok or read buffered log command completed ok.
  476. */
  477. if (request->op == TO_RUN) {
  478. /* Rewind unload completed ok. */
  479. tape_med_state_set(device, MS_UNLOADED);
  480. return tape_34xx_erp_succeeded(request);
  481. }
  482. /* tape_34xx doesn't use read buffered log commands. */
  483. return tape_34xx_erp_bug(device, request, irb, sense[3]);
  484. case 0x2c:
  485. /*
  486. * Permanent equipment check. CU has tried recovery, but
  487. * did not succeed.
  488. */
  489. return tape_34xx_erp_failed(request, -EIO);
  490. case 0x2d:
  491. /* Data security erase failure. */
  492. if (request->op == TO_DSE)
  493. return tape_34xx_erp_failed(request, -EIO);
  494. /* Data security erase failure, but no such command issued. */
  495. return tape_34xx_erp_bug(device, request, irb, sense[3]);
  496. case 0x2e:
  497. /*
  498. * Not capable. This indicates either that the drive fails
  499. * reading the format id mark or that that format specified
  500. * is not supported by the drive.
  501. */
  502. dev_warn (&device->cdev->dev, "The tape unit cannot process "
  503. "the tape format\n");
  504. return tape_34xx_erp_failed(request, -EMEDIUMTYPE);
  505. case 0x30:
  506. /* The medium is write protected. */
  507. dev_warn (&device->cdev->dev, "The tape medium is write-"
  508. "protected\n");
  509. return tape_34xx_erp_failed(request, -EACCES);
  510. case 0x32:
  511. // Tension loss. We cannot recover this, it's an I/O error.
  512. dev_warn (&device->cdev->dev, "The tape does not have the "
  513. "required tape tension\n");
  514. return tape_34xx_erp_failed(request, -EIO);
  515. case 0x33:
  516. /*
  517. * Load Failure. The cartridge was not inserted correctly or
  518. * the tape is not threaded correctly.
  519. */
  520. dev_warn (&device->cdev->dev, "The tape unit failed to load"
  521. " the cartridge\n");
  522. tape_34xx_delete_sbid_from(device, 0);
  523. return tape_34xx_erp_failed(request, -EIO);
  524. case 0x34:
  525. /*
  526. * Unload failure. The drive cannot maintain tape tension
  527. * and control tape movement during an unload operation.
  528. */
  529. dev_warn (&device->cdev->dev, "Automatic unloading of the tape"
  530. " cartridge failed\n");
  531. if (request->op == TO_RUN)
  532. return tape_34xx_erp_failed(request, -EIO);
  533. return tape_34xx_erp_bug(device, request, irb, sense[3]);
  534. case 0x35:
  535. /*
  536. * Drive equipment check. One of the following:
  537. * - cu cannot recover from a drive detected error
  538. * - a check code message is shown on drive display
  539. * - the cartridge loader does not respond correctly
  540. * - a failure occurs during an index, load, or unload cycle
  541. */
  542. dev_warn (&device->cdev->dev, "An equipment check has occurred"
  543. " on the tape unit\n");
  544. return tape_34xx_erp_failed(request, -EIO);
  545. case 0x36:
  546. if (device->cdev->id.driver_info == tape_3490)
  547. /* End of data. */
  548. return tape_34xx_erp_failed(request, -EIO);
  549. /* This erpa is reserved for 3480 */
  550. return tape_34xx_erp_bug(device, request, irb, sense[3]);
  551. case 0x37:
  552. /*
  553. * Tape length error. The tape is shorter than reported in
  554. * the beginning-of-tape data.
  555. */
  556. dev_warn (&device->cdev->dev, "The tape information states an"
  557. " incorrect length\n");
  558. return tape_34xx_erp_failed(request, -EIO);
  559. case 0x38:
  560. /*
  561. * Physical end of tape. A read/write operation reached
  562. * the physical end of tape.
  563. */
  564. if (request->op==TO_WRI ||
  565. request->op==TO_DSE ||
  566. request->op==TO_WTM)
  567. return tape_34xx_erp_failed(request, -ENOSPC);
  568. return tape_34xx_erp_failed(request, -EIO);
  569. case 0x39:
  570. /* Backward at Beginning of tape. */
  571. return tape_34xx_erp_failed(request, -EIO);
  572. case 0x3a:
  573. /* Drive switched to not ready. */
  574. dev_warn (&device->cdev->dev, "The tape unit is not ready\n");
  575. return tape_34xx_erp_failed(request, -EIO);
  576. case 0x3b:
  577. /* Manual rewind or unload. This causes an I/O error. */
  578. dev_warn (&device->cdev->dev, "The tape medium has been "
  579. "rewound or unloaded manually\n");
  580. tape_34xx_delete_sbid_from(device, 0);
  581. return tape_34xx_erp_failed(request, -EIO);
  582. case 0x42:
  583. /*
  584. * Degraded mode. A condition that can cause degraded
  585. * performance is detected.
  586. */
  587. dev_warn (&device->cdev->dev, "The tape subsystem is running "
  588. "in degraded mode\n");
  589. return tape_34xx_erp_retry(request);
  590. case 0x43:
  591. /* Drive not ready. */
  592. tape_34xx_delete_sbid_from(device, 0);
  593. tape_med_state_set(device, MS_UNLOADED);
  594. /* Some commands commands are successful even in this case */
  595. if (sense[1] & SENSE_DRIVE_ONLINE) {
  596. switch(request->op) {
  597. case TO_ASSIGN:
  598. case TO_UNASSIGN:
  599. case TO_DIS:
  600. case TO_NOP:
  601. return tape_34xx_done(request);
  602. break;
  603. default:
  604. break;
  605. }
  606. }
  607. return tape_34xx_erp_failed(request, -ENOMEDIUM);
  608. case 0x44:
  609. /* Locate Block unsuccessful. */
  610. if (request->op != TO_BLOCK && request->op != TO_LBL)
  611. /* No locate block was issued. */
  612. return tape_34xx_erp_bug(device, request,
  613. irb, sense[3]);
  614. return tape_34xx_erp_failed(request, -EIO);
  615. case 0x45:
  616. /* The drive is assigned to a different channel path. */
  617. dev_warn (&device->cdev->dev, "The tape unit is already "
  618. "assigned\n");
  619. return tape_34xx_erp_failed(request, -EIO);
  620. case 0x46:
  621. /*
  622. * Drive not on-line. Drive may be switched offline,
  623. * the power supply may be switched off or
  624. * the drive address may not be set correctly.
  625. */
  626. dev_warn (&device->cdev->dev, "The tape unit is not online\n");
  627. return tape_34xx_erp_failed(request, -EIO);
  628. case 0x47:
  629. /* Volume fenced. CU reports volume integrity is lost. */
  630. dev_warn (&device->cdev->dev, "The control unit has fenced "
  631. "access to the tape volume\n");
  632. tape_34xx_delete_sbid_from(device, 0);
  633. return tape_34xx_erp_failed(request, -EIO);
  634. case 0x48:
  635. /* Log sense data and retry request. */
  636. return tape_34xx_erp_retry(request);
  637. case 0x49:
  638. /* Bus out check. A parity check error on the bus was found. */
  639. dev_warn (&device->cdev->dev, "A parity error occurred on the "
  640. "tape bus\n");
  641. return tape_34xx_erp_failed(request, -EIO);
  642. case 0x4a:
  643. /* Control unit erp failed. */
  644. dev_warn (&device->cdev->dev, "I/O error recovery failed on "
  645. "the tape control unit\n");
  646. return tape_34xx_erp_failed(request, -EIO);
  647. case 0x4b:
  648. /*
  649. * CU and drive incompatible. The drive requests micro-program
  650. * patches, which are not available on the CU.
  651. */
  652. dev_warn (&device->cdev->dev, "The tape unit requires a "
  653. "firmware update\n");
  654. return tape_34xx_erp_failed(request, -EIO);
  655. case 0x4c:
  656. /*
  657. * Recovered Check-One failure. Cu develops a hardware error,
  658. * but is able to recover.
  659. */
  660. return tape_34xx_erp_retry(request);
  661. case 0x4d:
  662. if (device->cdev->id.driver_info == tape_3490)
  663. /*
  664. * Resetting event received. Since the driver does
  665. * not support resetting event recovery (which has to
  666. * be handled by the I/O Layer), retry our command.
  667. */
  668. return tape_34xx_erp_retry(request);
  669. /* This erpa is reserved for 3480. */
  670. return tape_34xx_erp_bug(device, request, irb, sense[3]);
  671. case 0x4e:
  672. if (device->cdev->id.driver_info == tape_3490) {
  673. /*
  674. * Maximum block size exceeded. This indicates, that
  675. * the block to be written is larger than allowed for
  676. * buffered mode.
  677. */
  678. dev_warn (&device->cdev->dev, "The maximum block size"
  679. " for buffered mode is exceeded\n");
  680. return tape_34xx_erp_failed(request, -ENOBUFS);
  681. }
  682. /* This erpa is reserved for 3480. */
  683. return tape_34xx_erp_bug(device, request, irb, sense[3]);
  684. case 0x50:
  685. /*
  686. * Read buffered log (Overflow). CU is running in extended
  687. * buffered log mode, and a counter overflows. This should
  688. * never happen, since we're never running in extended
  689. * buffered log mode.
  690. */
  691. return tape_34xx_erp_retry(request);
  692. case 0x51:
  693. /*
  694. * Read buffered log (EOV). EOF processing occurs while the
  695. * CU is in extended buffered log mode. This should never
  696. * happen, since we're never running in extended buffered
  697. * log mode.
  698. */
  699. return tape_34xx_erp_retry(request);
  700. case 0x52:
  701. /* End of Volume complete. Rewind unload completed ok. */
  702. if (request->op == TO_RUN) {
  703. tape_med_state_set(device, MS_UNLOADED);
  704. tape_34xx_delete_sbid_from(device, 0);
  705. return tape_34xx_erp_succeeded(request);
  706. }
  707. return tape_34xx_erp_bug(device, request, irb, sense[3]);
  708. case 0x53:
  709. /* Global command intercept. */
  710. return tape_34xx_erp_retry(request);
  711. case 0x54:
  712. /* Channel interface recovery (temporary). */
  713. return tape_34xx_erp_retry(request);
  714. case 0x55:
  715. /* Channel interface recovery (permanent). */
  716. dev_warn (&device->cdev->dev, "A channel interface error cannot be"
  717. " recovered\n");
  718. return tape_34xx_erp_failed(request, -EIO);
  719. case 0x56:
  720. /* Channel protocol error. */
  721. dev_warn (&device->cdev->dev, "A channel protocol error "
  722. "occurred\n");
  723. return tape_34xx_erp_failed(request, -EIO);
  724. case 0x57:
  725. if (device->cdev->id.driver_info == tape_3480) {
  726. /* Attention intercept. */
  727. return tape_34xx_erp_retry(request);
  728. } else {
  729. /* Global status intercept. */
  730. return tape_34xx_erp_retry(request);
  731. }
  732. case 0x5a:
  733. /*
  734. * Tape length incompatible. The tape inserted is too long,
  735. * which could cause damage to the tape or the drive.
  736. */
  737. dev_warn (&device->cdev->dev, "The tape unit does not support "
  738. "the tape length\n");
  739. return tape_34xx_erp_failed(request, -EIO);
  740. case 0x5b:
  741. /* Format 3480 XF incompatible */
  742. if (sense[1] & SENSE_BEGINNING_OF_TAPE)
  743. /* The tape will get overwritten. */
  744. return tape_34xx_erp_retry(request);
  745. dev_warn (&device->cdev->dev, "The tape unit does not support"
  746. " format 3480 XF\n");
  747. return tape_34xx_erp_failed(request, -EIO);
  748. case 0x5c:
  749. /* Format 3480-2 XF incompatible */
  750. dev_warn (&device->cdev->dev, "The tape unit does not support tape "
  751. "format 3480-2 XF\n");
  752. return tape_34xx_erp_failed(request, -EIO);
  753. case 0x5d:
  754. /* Tape length violation. */
  755. dev_warn (&device->cdev->dev, "The tape unit does not support"
  756. " the current tape length\n");
  757. return tape_34xx_erp_failed(request, -EMEDIUMTYPE);
  758. case 0x5e:
  759. /* Compaction algorithm incompatible. */
  760. dev_warn (&device->cdev->dev, "The tape unit does not support"
  761. " the compaction algorithm\n");
  762. return tape_34xx_erp_failed(request, -EMEDIUMTYPE);
  763. /* The following erpas should have been covered earlier. */
  764. case 0x23: /* Read data check. */
  765. case 0x25: /* Write data check. */
  766. case 0x26: /* Data check (read opposite). */
  767. case 0x28: /* Write id mark check. */
  768. case 0x31: /* Tape void. */
  769. case 0x40: /* Overrun error. */
  770. case 0x41: /* Record sequence error. */
  771. /* All other erpas are reserved for future use. */
  772. default:
  773. return tape_34xx_erp_bug(device, request, irb, sense[3]);
  774. }
  775. }
  776. /*
  777. * 3480/3490 interrupt handler
  778. */
  779. static int
  780. tape_34xx_irq(struct tape_device *device, struct tape_request *request,
  781. struct irb *irb)
  782. {
  783. if (request == NULL)
  784. return tape_34xx_unsolicited_irq(device, irb);
  785. if ((irb->scsw.cmd.dstat & DEV_STAT_UNIT_EXCEP) &&
  786. (irb->scsw.cmd.dstat & DEV_STAT_DEV_END) &&
  787. (request->op == TO_WRI)) {
  788. /* Write at end of volume */
  789. return tape_34xx_erp_failed(request, -ENOSPC);
  790. }
  791. if (irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK)
  792. return tape_34xx_unit_check(device, request, irb);
  793. if (irb->scsw.cmd.dstat & DEV_STAT_DEV_END) {
  794. /*
  795. * A unit exception occurs on skipping over a tapemark block.
  796. */
  797. if (irb->scsw.cmd.dstat & DEV_STAT_UNIT_EXCEP) {
  798. if (request->op == TO_BSB || request->op == TO_FSB)
  799. request->rescnt++;
  800. else
  801. DBF_EVENT(5, "Unit Exception!\n");
  802. }
  803. return tape_34xx_done(request);
  804. }
  805. DBF_EVENT(6, "xunknownirq\n");
  806. tape_dump_sense_dbf(device, request, irb);
  807. return TAPE_IO_STOP;
  808. }
  809. /*
  810. * ioctl_overload
  811. */
  812. static int
  813. tape_34xx_ioctl(struct tape_device *device, unsigned int cmd, unsigned long arg)
  814. {
  815. if (cmd == TAPE390_DISPLAY) {
  816. struct display_struct disp;
  817. if (copy_from_user(&disp, (char __user *) arg, sizeof(disp)) != 0)
  818. return -EFAULT;
  819. return tape_std_display(device, &disp);
  820. } else
  821. return -EINVAL;
  822. }
  823. static inline void
  824. tape_34xx_append_new_sbid(struct tape_34xx_block_id bid, struct list_head *l)
  825. {
  826. struct tape_34xx_sbid * new_sbid;
  827. new_sbid = kmalloc(sizeof(*new_sbid), GFP_ATOMIC);
  828. if (!new_sbid)
  829. return;
  830. new_sbid->bid = bid;
  831. list_add(&new_sbid->list, l);
  832. }
  833. /*
  834. * Build up the search block ID list. The block ID consists of a logical
  835. * block number and a hardware specific part. The hardware specific part
  836. * helps the tape drive to speed up searching for a specific block.
  837. */
  838. static void
  839. tape_34xx_add_sbid(struct tape_device *device, struct tape_34xx_block_id bid)
  840. {
  841. struct list_head * sbid_list;
  842. struct tape_34xx_sbid * sbid;
  843. struct list_head * l;
  844. /*
  845. * immediately return if there is no list at all or the block to add
  846. * is located in segment 1 of wrap 0 because this position is used
  847. * if no hardware position data is supplied.
  848. */
  849. sbid_list = (struct list_head *) device->discdata;
  850. if (!sbid_list || (bid.segment < 2 && bid.wrap == 0))
  851. return;
  852. /*
  853. * Search the position where to insert the new entry. Hardware
  854. * acceleration uses only the segment and wrap number. So we
  855. * need only one entry for a specific wrap/segment combination.
  856. * If there is a block with a lower number but the same hard-
  857. * ware position data we just update the block number in the
  858. * existing entry.
  859. */
  860. list_for_each(l, sbid_list) {
  861. sbid = list_entry(l, struct tape_34xx_sbid, list);
  862. if (
  863. (sbid->bid.segment == bid.segment) &&
  864. (sbid->bid.wrap == bid.wrap)
  865. ) {
  866. if (bid.block < sbid->bid.block)
  867. sbid->bid = bid;
  868. else return;
  869. break;
  870. }
  871. /* Sort in according to logical block number. */
  872. if (bid.block < sbid->bid.block) {
  873. tape_34xx_append_new_sbid(bid, l->prev);
  874. break;
  875. }
  876. }
  877. /* List empty or new block bigger than last entry. */
  878. if (l == sbid_list)
  879. tape_34xx_append_new_sbid(bid, l->prev);
  880. DBF_LH(4, "Current list is:\n");
  881. list_for_each(l, sbid_list) {
  882. sbid = list_entry(l, struct tape_34xx_sbid, list);
  883. DBF_LH(4, "%d:%03d@%05d\n",
  884. sbid->bid.wrap,
  885. sbid->bid.segment,
  886. sbid->bid.block
  887. );
  888. }
  889. }
  890. /*
  891. * Delete all entries from the search block ID list that belong to tape blocks
  892. * equal or higher than the given number.
  893. */
  894. static void
  895. tape_34xx_delete_sbid_from(struct tape_device *device, int from)
  896. {
  897. struct list_head * sbid_list;
  898. struct tape_34xx_sbid * sbid;
  899. struct list_head * l;
  900. struct list_head * n;
  901. sbid_list = (struct list_head *) device->discdata;
  902. if (!sbid_list)
  903. return;
  904. list_for_each_safe(l, n, sbid_list) {
  905. sbid = list_entry(l, struct tape_34xx_sbid, list);
  906. if (sbid->bid.block >= from) {
  907. DBF_LH(4, "Delete sbid %d:%03d@%05d\n",
  908. sbid->bid.wrap,
  909. sbid->bid.segment,
  910. sbid->bid.block
  911. );
  912. list_del(l);
  913. kfree(sbid);
  914. }
  915. }
  916. }
  917. /*
  918. * Merge hardware position data into a block id.
  919. */
  920. static void
  921. tape_34xx_merge_sbid(
  922. struct tape_device * device,
  923. struct tape_34xx_block_id * bid
  924. ) {
  925. struct tape_34xx_sbid * sbid;
  926. struct tape_34xx_sbid * sbid_to_use;
  927. struct list_head * sbid_list;
  928. struct list_head * l;
  929. sbid_list = (struct list_head *) device->discdata;
  930. bid->wrap = 0;
  931. bid->segment = 1;
  932. if (!sbid_list || list_empty(sbid_list))
  933. return;
  934. sbid_to_use = NULL;
  935. list_for_each(l, sbid_list) {
  936. sbid = list_entry(l, struct tape_34xx_sbid, list);
  937. if (sbid->bid.block >= bid->block)
  938. break;
  939. sbid_to_use = sbid;
  940. }
  941. if (sbid_to_use) {
  942. bid->wrap = sbid_to_use->bid.wrap;
  943. bid->segment = sbid_to_use->bid.segment;
  944. DBF_LH(4, "Use %d:%03d@%05d for %05d\n",
  945. sbid_to_use->bid.wrap,
  946. sbid_to_use->bid.segment,
  947. sbid_to_use->bid.block,
  948. bid->block
  949. );
  950. }
  951. }
  952. static int
  953. tape_34xx_setup_device(struct tape_device * device)
  954. {
  955. int rc;
  956. struct list_head * discdata;
  957. DBF_EVENT(6, "34xx device setup\n");
  958. if ((rc = tape_std_assign(device)) == 0) {
  959. if ((rc = tape_34xx_medium_sense(device)) != 0) {
  960. DBF_LH(3, "34xx medium sense returned %d\n", rc);
  961. }
  962. }
  963. discdata = kmalloc(sizeof(struct list_head), GFP_KERNEL);
  964. if (discdata) {
  965. INIT_LIST_HEAD(discdata);
  966. device->discdata = discdata;
  967. }
  968. return rc;
  969. }
  970. static void
  971. tape_34xx_cleanup_device(struct tape_device *device)
  972. {
  973. tape_std_unassign(device);
  974. if (device->discdata) {
  975. tape_34xx_delete_sbid_from(device, 0);
  976. kfree(device->discdata);
  977. device->discdata = NULL;
  978. }
  979. }
  980. /*
  981. * MTTELL: Tell block. Return the number of block relative to current file.
  982. */
  983. static int
  984. tape_34xx_mttell(struct tape_device *device, int mt_count)
  985. {
  986. struct {
  987. struct tape_34xx_block_id cbid;
  988. struct tape_34xx_block_id dbid;
  989. } __attribute__ ((packed)) block_id;
  990. int rc;
  991. rc = tape_std_read_block_id(device, (__u64 *) &block_id);
  992. if (rc)
  993. return rc;
  994. tape_34xx_add_sbid(device, block_id.cbid);
  995. return block_id.cbid.block;
  996. }
  997. /*
  998. * MTSEEK: seek to the specified block.
  999. */
  1000. static int
  1001. tape_34xx_mtseek(struct tape_device *device, int mt_count)
  1002. {
  1003. struct tape_request *request;
  1004. struct tape_34xx_block_id * bid;
  1005. if (mt_count > 0x3fffff) {
  1006. DBF_EXCEPTION(6, "xsee parm\n");
  1007. return -EINVAL;
  1008. }
  1009. request = tape_alloc_request(3, 4);
  1010. if (IS_ERR(request))
  1011. return PTR_ERR(request);
  1012. /* setup ccws */
  1013. request->op = TO_LBL;
  1014. bid = (struct tape_34xx_block_id *) request->cpdata;
  1015. bid->format = (*device->modeset_byte & 0x08) ?
  1016. TAPE34XX_FMT_3480_XF : TAPE34XX_FMT_3480;
  1017. bid->block = mt_count;
  1018. tape_34xx_merge_sbid(device, bid);
  1019. tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
  1020. tape_ccw_cc(request->cpaddr + 1, LOCATE, 4, request->cpdata);
  1021. tape_ccw_end(request->cpaddr + 2, NOP, 0, NULL);
  1022. /* execute it */
  1023. return tape_do_io_free(device, request);
  1024. }
  1025. /*
  1026. * List of 3480/3490 magnetic tape commands.
  1027. */
  1028. static tape_mtop_fn tape_34xx_mtop[TAPE_NR_MTOPS] = {
  1029. [MTRESET] = tape_std_mtreset,
  1030. [MTFSF] = tape_std_mtfsf,
  1031. [MTBSF] = tape_std_mtbsf,
  1032. [MTFSR] = tape_std_mtfsr,
  1033. [MTBSR] = tape_std_mtbsr,
  1034. [MTWEOF] = tape_std_mtweof,
  1035. [MTREW] = tape_std_mtrew,
  1036. [MTOFFL] = tape_std_mtoffl,
  1037. [MTNOP] = tape_std_mtnop,
  1038. [MTRETEN] = tape_std_mtreten,
  1039. [MTBSFM] = tape_std_mtbsfm,
  1040. [MTFSFM] = tape_std_mtfsfm,
  1041. [MTEOM] = tape_std_mteom,
  1042. [MTERASE] = tape_std_mterase,
  1043. [MTRAS1] = NULL,
  1044. [MTRAS2] = NULL,
  1045. [MTRAS3] = NULL,
  1046. [MTSETBLK] = tape_std_mtsetblk,
  1047. [MTSETDENSITY] = NULL,
  1048. [MTSEEK] = tape_34xx_mtseek,
  1049. [MTTELL] = tape_34xx_mttell,
  1050. [MTSETDRVBUFFER] = NULL,
  1051. [MTFSS] = NULL,
  1052. [MTBSS] = NULL,
  1053. [MTWSM] = NULL,
  1054. [MTLOCK] = NULL,
  1055. [MTUNLOCK] = NULL,
  1056. [MTLOAD] = tape_std_mtload,
  1057. [MTUNLOAD] = tape_std_mtunload,
  1058. [MTCOMPRESSION] = tape_std_mtcompression,
  1059. [MTSETPART] = NULL,
  1060. [MTMKPART] = NULL
  1061. };
  1062. /*
  1063. * Tape discipline structure for 3480 and 3490.
  1064. */
  1065. static struct tape_discipline tape_discipline_34xx = {
  1066. .owner = THIS_MODULE,
  1067. .setup_device = tape_34xx_setup_device,
  1068. .cleanup_device = tape_34xx_cleanup_device,
  1069. .process_eov = tape_std_process_eov,
  1070. .irq = tape_34xx_irq,
  1071. .read_block = tape_std_read_block,
  1072. .write_block = tape_std_write_block,
  1073. .ioctl_fn = tape_34xx_ioctl,
  1074. .mtop_array = tape_34xx_mtop
  1075. };
  1076. static struct ccw_device_id tape_34xx_ids[] = {
  1077. { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), .driver_info = tape_3480},
  1078. { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), .driver_info = tape_3490},
  1079. { /* end of list */ },
  1080. };
  1081. static int
  1082. tape_34xx_online(struct ccw_device *cdev)
  1083. {
  1084. return tape_generic_online(
  1085. dev_get_drvdata(&cdev->dev),
  1086. &tape_discipline_34xx
  1087. );
  1088. }
  1089. static struct ccw_driver tape_34xx_driver = {
  1090. .driver = {
  1091. .name = "tape_34xx",
  1092. .owner = THIS_MODULE,
  1093. },
  1094. .ids = tape_34xx_ids,
  1095. .probe = tape_generic_probe,
  1096. .remove = tape_generic_remove,
  1097. .set_online = tape_34xx_online,
  1098. .set_offline = tape_generic_offline,
  1099. .freeze = tape_generic_pm_suspend,
  1100. .int_class = IOINT_TAP,
  1101. };
  1102. static int
  1103. tape_34xx_init (void)
  1104. {
  1105. int rc;
  1106. TAPE_DBF_AREA = debug_register ( "tape_34xx", 2, 2, 4*sizeof(long));
  1107. debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view);
  1108. #ifdef DBF_LIKE_HELL
  1109. debug_set_level(TAPE_DBF_AREA, 6);
  1110. #endif
  1111. DBF_EVENT(3, "34xx init\n");
  1112. /* Register driver for 3480/3490 tapes. */
  1113. rc = ccw_driver_register(&tape_34xx_driver);
  1114. if (rc)
  1115. DBF_EVENT(3, "34xx init failed\n");
  1116. else
  1117. DBF_EVENT(3, "34xx registered\n");
  1118. return rc;
  1119. }
  1120. static void
  1121. tape_34xx_exit(void)
  1122. {
  1123. ccw_driver_unregister(&tape_34xx_driver);
  1124. debug_unregister(TAPE_DBF_AREA);
  1125. }
  1126. MODULE_DEVICE_TABLE(ccw, tape_34xx_ids);
  1127. MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH");
  1128. MODULE_DESCRIPTION("Linux on zSeries channel attached 3480 tape device driver");
  1129. MODULE_LICENSE("GPL");
  1130. module_init(tape_34xx_init);
  1131. module_exit(tape_34xx_exit);