11// SPDX-License-Identifier: GPL-2.0
22/*
3- * tape device discipline for 3480/ 3490 tapes.
3+ * tape device discipline for 3490 tapes.
44 *
55 * Copyright IBM Corp. 2001, 2009
66 * Author(s): Carsten Otte <cotte@de.ibm.com>
@@ -398,13 +398,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
398398 dev_warn (& device -> cdev -> dev , "The tape contains an "
399399 "incorrect block ID sequence\n" );
400400 return tape_34xx_erp_failed (request , - EIO );
401- default :
402- /* all data checks for 3480 should result in one of
403- * the above erpa-codes. For 3490, other data-check
404- * conditions do exist. */
405- if (device -> cdev -> id .driver_info == tape_3480 )
406- return tape_34xx_erp_bug (device , request ,
407- irb , -6 );
408401 }
409402 }
410403
@@ -535,11 +528,8 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
535528 " on the tape unit\n" );
536529 return tape_34xx_erp_failed (request , - EIO );
537530 case 0x36 :
538- if (device -> cdev -> id .driver_info == tape_3490 )
539- /* End of data. */
540- return tape_34xx_erp_failed (request , - EIO );
541- /* This erpa is reserved for 3480 */
542- return tape_34xx_erp_bug (device , request , irb , sense [3 ]);
531+ /* End of data. */
532+ return tape_34xx_erp_failed (request , - EIO );
543533 case 0x37 :
544534 /*
545535 * Tape length error. The tape is shorter than reported in
@@ -648,28 +638,21 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
648638 */
649639 return tape_34xx_erp_retry (request );
650640 case 0x4d :
651- if (device -> cdev -> id .driver_info == tape_3490 )
652- /*
653- * Resetting event received. Since the driver does
654- * not support resetting event recovery (which has to
655- * be handled by the I/O Layer), retry our command.
656- */
657- return tape_34xx_erp_retry (request );
658- /* This erpa is reserved for 3480. */
659- return tape_34xx_erp_bug (device , request , irb , sense [3 ]);
641+ /*
642+ * Resetting event received. Since the driver does
643+ * not support resetting event recovery (which has to
644+ * be handled by the I/O Layer), retry our command.
645+ */
646+ return tape_34xx_erp_retry (request );
660647 case 0x4e :
661- if (device -> cdev -> id .driver_info == tape_3490 ) {
662- /*
663- * Maximum block size exceeded. This indicates, that
664- * the block to be written is larger than allowed for
665- * buffered mode.
666- */
667- dev_warn (& device -> cdev -> dev , "The maximum block size"
668- " for buffered mode is exceeded\n" );
669- return tape_34xx_erp_failed (request , - ENOBUFS );
670- }
671- /* This erpa is reserved for 3480. */
672- return tape_34xx_erp_bug (device , request , irb , sense [3 ]);
648+ /*
649+ * Maximum block size exceeded. This indicates, that
650+ * the block to be written is larger than allowed for
651+ * buffered mode.
652+ */
653+ dev_warn (& device -> cdev -> dev ,
654+ "The maximum block size for buffered mode is exceeded\n" );
655+ return tape_34xx_erp_failed (request , - ENOBUFS );
673656 case 0x50 :
674657 /*
675658 * Read buffered log (Overflow). CU is running in extended
@@ -710,10 +693,7 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
710693 "occurred\n" );
711694 return tape_34xx_erp_failed (request , - EIO );
712695 case 0x57 :
713- /*
714- * 3480: Attention intercept.
715- * 3490: Global status intercept.
716- */
696+ /* Global status intercept. */
717697 return tape_34xx_erp_retry (request );
718698 case 0x5a :
719699 /*
@@ -723,19 +703,6 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
723703 dev_warn (& device -> cdev -> dev , "The tape unit does not support "
724704 "the tape length\n" );
725705 return tape_34xx_erp_failed (request , - EIO );
726- case 0x5b :
727- /* Format 3480 XF incompatible */
728- if (sense [1 ] & SENSE_BEGINNING_OF_TAPE )
729- /* The tape will get overwritten. */
730- return tape_34xx_erp_retry (request );
731- dev_warn (& device -> cdev -> dev , "The tape unit does not support"
732- " format 3480 XF\n" );
733- return tape_34xx_erp_failed (request , - EIO );
734- case 0x5c :
735- /* Format 3480-2 XF incompatible */
736- dev_warn (& device -> cdev -> dev , "The tape unit does not support tape "
737- "format 3480-2 XF\n" );
738- return tape_34xx_erp_failed (request , - EIO );
739706 case 0x5d :
740707 /* Tape length violation. */
741708 dev_warn (& device -> cdev -> dev , "The tape unit does not support"
@@ -762,7 +729,7 @@ tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
762729}
763730
764731/*
765- * 3480/ 3490 interrupt handler
732+ * 3490 interrupt handler
766733 */
767734static int
768735tape_34xx_irq (struct tape_device * device , struct tape_request * request ,
@@ -870,7 +837,7 @@ tape_34xx_mtseek(struct tape_device *device, int mt_count)
870837}
871838
872839/*
873- * List of 3480/ 3490 magnetic tape commands.
840+ * List of 3490 tape commands.
874841 */
875842static tape_mtop_fn tape_34xx_mtop [TAPE_NR_MTOPS ] = {
876843 [MTRESET ] = tape_std_mtreset ,
@@ -908,7 +875,7 @@ static tape_mtop_fn tape_34xx_mtop[TAPE_NR_MTOPS] = {
908875};
909876
910877/*
911- * Tape discipline structure for 3480 and 3490.
878+ * Tape discipline structure for 3490.
912879 */
913880static struct tape_discipline tape_discipline_34xx = {
914881 .owner = THIS_MODULE ,
@@ -922,7 +889,6 @@ static struct tape_discipline tape_discipline_34xx = {
922889};
923890
924891static struct ccw_device_id tape_34xx_ids [] = {
925- { CCW_DEVICE_DEVTYPE (0x3480 , 0 , 0x3480 , 0 ), .driver_info = tape_3480 },
926892 { CCW_DEVICE_DEVTYPE (0x3490 , 0 , 0x3490 , 0 ), .driver_info = tape_3490 },
927893 { /* end of list */ },
928894};
@@ -961,7 +927,7 @@ tape_34xx_init (void)
961927#endif
962928
963929 DBF_EVENT (3 , "34xx init\n" );
964- /* Register driver for 3480/ 3490 tapes. */
930+ /* Register driver for 3490 tapes. */
965931 rc = ccw_driver_register (& tape_34xx_driver );
966932 if (rc )
967933 DBF_EVENT (3 , "34xx init failed\n" );
@@ -980,7 +946,7 @@ tape_34xx_exit(void)
980946
981947MODULE_DEVICE_TABLE (ccw , tape_34xx_ids );
982948MODULE_AUTHOR ("(C) 2001-2002 IBM Deutschland Entwicklung GmbH" );
983- MODULE_DESCRIPTION ("Linux on zSeries channel attached 3480 tape device driver" );
949+ MODULE_DESCRIPTION ("Linux on zSeries channel attached 3490 tape device driver" );
984950MODULE_LICENSE ("GPL" );
985951
986952module_init (tape_34xx_init );
0 commit comments