aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorStefan Bader <shbader@de.ibm.com>2006-04-27 21:40:16 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-28 11:33:48 -0400
commit2cc924b8ba1e9493ed50f5b793974e2427a15748 (patch)
treec6e682af72761ac6dbae3e63928e49170e6bdbff /drivers/s390
parent3363fbdd6fb4992ffe6c17c0dd7388ffa22d99e6 (diff)
[PATCH] s390: tape 3590 changes
Added some changes that where proposed by Andrew Morton. Added 3592 device type. Signed-off-by: Stefan Bader <shbader@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/tape_3590.c22
-rw-r--r--drivers/s390/char/tape_std.h1
2 files changed, 12 insertions, 11 deletions
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c
index c3915f60a3aa..d71ef1adea59 100644
--- a/drivers/s390/char/tape_3590.c
+++ b/drivers/s390/char/tape_3590.c
@@ -230,14 +230,16 @@ tape_3590_read_attmsg(struct tape_device *device)
230 * These functions are used to schedule follow-up actions from within an 230 * These functions are used to schedule follow-up actions from within an
231 * interrupt context (like unsolicited interrupts). 231 * interrupt context (like unsolicited interrupts).
232 */ 232 */
233struct work_handler_data {
234 struct tape_device *device;
235 enum tape_op op;
236 struct work_struct work;
237};
238
233static void 239static void
234tape_3590_work_handler(void *data) 240tape_3590_work_handler(void *data)
235{ 241{
236 struct { 242 struct work_handler_data *p = data;
237 struct tape_device *device;
238 enum tape_op op;
239 struct work_struct work;
240 } *p = data;
241 243
242 switch (p->op) { 244 switch (p->op) {
243 case TO_MSEN: 245 case TO_MSEN:
@@ -257,11 +259,7 @@ tape_3590_work_handler(void *data)
257static int 259static int
258tape_3590_schedule_work(struct tape_device *device, enum tape_op op) 260tape_3590_schedule_work(struct tape_device *device, enum tape_op op)
259{ 261{
260 struct { 262 struct work_handler_data *p;
261 struct tape_device *device;
262 enum tape_op op;
263 struct work_struct work;
264 } *p;
265 263
266 if ((p = kzalloc(sizeof(*p), GFP_ATOMIC)) == NULL) 264 if ((p = kzalloc(sizeof(*p), GFP_ATOMIC)) == NULL)
267 return -ENOMEM; 265 return -ENOMEM;
@@ -316,7 +314,7 @@ tape_3590_bread(struct tape_device *device, struct request *req)
316 314
317 rq_for_each_bio(bio, req) { 315 rq_for_each_bio(bio, req) {
318 bio_for_each_segment(bv, bio, i) { 316 bio_for_each_segment(bv, bio, i) {
319 dst = kmap(bv->bv_page) + bv->bv_offset; 317 dst = page_address(bv->bv_page) + bv->bv_offset;
320 for (off = 0; off < bv->bv_len; 318 for (off = 0; off < bv->bv_len;
321 off += TAPEBLOCK_HSEC_SIZE) { 319 off += TAPEBLOCK_HSEC_SIZE) {
322 ccw->flags = CCW_FLAG_CC; 320 ccw->flags = CCW_FLAG_CC;
@@ -1168,6 +1166,7 @@ tape_3590_setup_device(struct tape_device *device)
1168static void 1166static void
1169tape_3590_cleanup_device(struct tape_device *device) 1167tape_3590_cleanup_device(struct tape_device *device)
1170{ 1168{
1169 flush_scheduled_work();
1171 tape_std_unassign(device); 1170 tape_std_unassign(device);
1172 1171
1173 kfree(device->discdata); 1172 kfree(device->discdata);
@@ -1234,6 +1233,7 @@ static struct tape_discipline tape_discipline_3590 = {
1234 1233
1235static struct ccw_device_id tape_3590_ids[] = { 1234static struct ccw_device_id tape_3590_ids[] = {
1236 {CCW_DEVICE_DEVTYPE(0x3590, 0, 0x3590, 0), .driver_info = tape_3590}, 1235 {CCW_DEVICE_DEVTYPE(0x3590, 0, 0x3590, 0), .driver_info = tape_3590},
1236 {CCW_DEVICE_DEVTYPE(0x3592, 0, 0x3592, 0), .driver_info = tape_3592},
1237 { /* end of list */ } 1237 { /* end of list */ }
1238}; 1238};
1239 1239
diff --git a/drivers/s390/char/tape_std.h b/drivers/s390/char/tape_std.h
index 2d311798edf4..1fc952359341 100644
--- a/drivers/s390/char/tape_std.h
+++ b/drivers/s390/char/tape_std.h
@@ -153,6 +153,7 @@ enum s390_tape_type {
153 tape_3480, 153 tape_3480,
154 tape_3490, 154 tape_3490,
155 tape_3590, 155 tape_3590,
156 tape_3592,
156}; 157};
157 158
158#endif // _TAPE_STD_H 159#endif // _TAPE_STD_H