diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-30 10:26:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-30 10:26:45 -0400 |
commit | 05cd2544f4b64d9a9eca0d170191867495e01feb (patch) | |
tree | 10146fb79bba464bac6f620d03b8cd50285065b7 /drivers | |
parent | 27f680adc65ca08bf72ed85d3a48d1ee70f77c7a (diff) | |
parent | a0601c8944dc08c2d349c24bd9c0b09c406229fc (diff) |
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Diffstat (limited to 'drivers')
65 files changed, 242 insertions, 154 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index aeadd00411a1..a67b8e7c712d 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -49,6 +49,17 @@ | |||
49 | #define DRV_NAME "ahci" | 49 | #define DRV_NAME "ahci" |
50 | #define DRV_VERSION "3.0" | 50 | #define DRV_VERSION "3.0" |
51 | 51 | ||
52 | /* Enclosure Management Control */ | ||
53 | #define EM_CTRL_MSG_TYPE 0x000f0000 | ||
54 | |||
55 | /* Enclosure Management LED Message Type */ | ||
56 | #define EM_MSG_LED_HBA_PORT 0x0000000f | ||
57 | #define EM_MSG_LED_PMP_SLOT 0x0000ff00 | ||
58 | #define EM_MSG_LED_VALUE 0xffff0000 | ||
59 | #define EM_MSG_LED_VALUE_ACTIVITY 0x00070000 | ||
60 | #define EM_MSG_LED_VALUE_OFF 0xfff80000 | ||
61 | #define EM_MSG_LED_VALUE_ON 0x00010000 | ||
62 | |||
52 | static int ahci_skip_host_reset; | 63 | static int ahci_skip_host_reset; |
53 | module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444); | 64 | module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444); |
54 | MODULE_PARM_DESC(skip_host_reset, "skip global host reset (0=don't skip, 1=skip)"); | 65 | MODULE_PARM_DESC(skip_host_reset, "skip global host reset (0=don't skip, 1=skip)"); |
@@ -588,6 +599,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
588 | { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */ | 599 | { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */ |
589 | { PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv }, /* 6121 */ | 600 | { PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv }, /* 6121 */ |
590 | 601 | ||
602 | /* Promise */ | ||
603 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ | ||
604 | |||
591 | /* Generic, PCI class code for AHCI */ | 605 | /* Generic, PCI class code for AHCI */ |
592 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 606 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
593 | PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci }, | 607 | PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci }, |
@@ -1220,18 +1234,20 @@ static void ahci_sw_activity_blink(unsigned long arg) | |||
1220 | struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; | 1234 | struct ahci_em_priv *emp = &pp->em_priv[link->pmp]; |
1221 | unsigned long led_message = emp->led_state; | 1235 | unsigned long led_message = emp->led_state; |
1222 | u32 activity_led_state; | 1236 | u32 activity_led_state; |
1237 | unsigned long flags; | ||
1223 | 1238 | ||
1224 | led_message &= 0xffff0000; | 1239 | led_message &= EM_MSG_LED_VALUE; |
1225 | led_message |= ap->port_no | (link->pmp << 8); | 1240 | led_message |= ap->port_no | (link->pmp << 8); |
1226 | 1241 | ||
1227 | /* check to see if we've had activity. If so, | 1242 | /* check to see if we've had activity. If so, |
1228 | * toggle state of LED and reset timer. If not, | 1243 | * toggle state of LED and reset timer. If not, |
1229 | * turn LED to desired idle state. | 1244 | * turn LED to desired idle state. |
1230 | */ | 1245 | */ |
1246 | spin_lock_irqsave(ap->lock, flags); | ||
1231 | if (emp->saved_activity != emp->activity) { | 1247 | if (emp->saved_activity != emp->activity) { |
1232 | emp->saved_activity = emp->activity; | 1248 | emp->saved_activity = emp->activity; |
1233 | /* get the current LED state */ | 1249 | /* get the current LED state */ |
1234 | activity_led_state = led_message & 0x00010000; | 1250 | activity_led_state = led_message & EM_MSG_LED_VALUE_ON; |
1235 | 1251 | ||
1236 | if (activity_led_state) | 1252 | if (activity_led_state) |
1237 | activity_led_state = 0; | 1253 | activity_led_state = 0; |
@@ -1239,17 +1255,18 @@ static void ahci_sw_activity_blink(unsigned long arg) | |||
1239 | activity_led_state = 1; | 1255 | activity_led_state = 1; |
1240 | 1256 | ||
1241 | /* clear old state */ | 1257 | /* clear old state */ |
1242 | led_message &= 0xfff8ffff; | 1258 | led_message &= ~EM_MSG_LED_VALUE_ACTIVITY; |
1243 | 1259 | ||
1244 | /* toggle state */ | 1260 | /* toggle state */ |
1245 | led_message |= (activity_led_state << 16); | 1261 | led_message |= (activity_led_state << 16); |
1246 | mod_timer(&emp->timer, jiffies + msecs_to_jiffies(100)); | 1262 | mod_timer(&emp->timer, jiffies + msecs_to_jiffies(100)); |
1247 | } else { | 1263 | } else { |
1248 | /* switch to idle */ | 1264 | /* switch to idle */ |
1249 | led_message &= 0xfff8ffff; | 1265 | led_message &= ~EM_MSG_LED_VALUE_ACTIVITY; |
1250 | if (emp->blink_policy == BLINK_OFF) | 1266 | if (emp->blink_policy == BLINK_OFF) |
1251 | led_message |= (1 << 16); | 1267 | led_message |= (1 << 16); |
1252 | } | 1268 | } |
1269 | spin_unlock_irqrestore(ap->lock, flags); | ||
1253 | ahci_transmit_led_message(ap, led_message, 4); | 1270 | ahci_transmit_led_message(ap, led_message, 4); |
1254 | } | 1271 | } |
1255 | 1272 | ||
@@ -1294,7 +1311,7 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state, | |||
1294 | struct ahci_em_priv *emp; | 1311 | struct ahci_em_priv *emp; |
1295 | 1312 | ||
1296 | /* get the slot number from the message */ | 1313 | /* get the slot number from the message */ |
1297 | pmp = (state & 0x0000ff00) >> 8; | 1314 | pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8; |
1298 | if (pmp < MAX_SLOTS) | 1315 | if (pmp < MAX_SLOTS) |
1299 | emp = &pp->em_priv[pmp]; | 1316 | emp = &pp->em_priv[pmp]; |
1300 | else | 1317 | else |
@@ -1319,7 +1336,7 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state, | |||
1319 | message[0] |= (4 << 8); | 1336 | message[0] |= (4 << 8); |
1320 | 1337 | ||
1321 | /* ignore 0:4 of byte zero, fill in port info yourself */ | 1338 | /* ignore 0:4 of byte zero, fill in port info yourself */ |
1322 | message[1] = ((state & 0xfffffff0) | ap->port_no); | 1339 | message[1] = ((state & ~EM_MSG_LED_HBA_PORT) | ap->port_no); |
1323 | 1340 | ||
1324 | /* write message to EM_LOC */ | 1341 | /* write message to EM_LOC */ |
1325 | writel(message[0], mmio + hpriv->em_loc); | 1342 | writel(message[0], mmio + hpriv->em_loc); |
@@ -1362,7 +1379,7 @@ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf, | |||
1362 | state = simple_strtoul(buf, NULL, 0); | 1379 | state = simple_strtoul(buf, NULL, 0); |
1363 | 1380 | ||
1364 | /* get the slot number from the message */ | 1381 | /* get the slot number from the message */ |
1365 | pmp = (state & 0x0000ff00) >> 8; | 1382 | pmp = (state & EM_MSG_LED_PMP_SLOT) >> 8; |
1366 | if (pmp < MAX_SLOTS) | 1383 | if (pmp < MAX_SLOTS) |
1367 | emp = &pp->em_priv[pmp]; | 1384 | emp = &pp->em_priv[pmp]; |
1368 | else | 1385 | else |
@@ -1373,7 +1390,7 @@ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf, | |||
1373 | * activity led through em_message | 1390 | * activity led through em_message |
1374 | */ | 1391 | */ |
1375 | if (emp->blink_policy) | 1392 | if (emp->blink_policy) |
1376 | state &= 0xfff8ffff; | 1393 | state &= ~EM_MSG_LED_VALUE_ACTIVITY; |
1377 | 1394 | ||
1378 | return ahci_transmit_led_message(ap, state, size); | 1395 | return ahci_transmit_led_message(ap, state, size); |
1379 | } | 1396 | } |
@@ -1392,16 +1409,16 @@ static ssize_t ahci_activity_store(struct ata_device *dev, enum sw_activity val) | |||
1392 | link->flags &= ~(ATA_LFLAG_SW_ACTIVITY); | 1409 | link->flags &= ~(ATA_LFLAG_SW_ACTIVITY); |
1393 | 1410 | ||
1394 | /* set the LED to OFF */ | 1411 | /* set the LED to OFF */ |
1395 | port_led_state &= 0xfff80000; | 1412 | port_led_state &= EM_MSG_LED_VALUE_OFF; |
1396 | port_led_state |= (ap->port_no | (link->pmp << 8)); | 1413 | port_led_state |= (ap->port_no | (link->pmp << 8)); |
1397 | ahci_transmit_led_message(ap, port_led_state, 4); | 1414 | ahci_transmit_led_message(ap, port_led_state, 4); |
1398 | } else { | 1415 | } else { |
1399 | link->flags |= ATA_LFLAG_SW_ACTIVITY; | 1416 | link->flags |= ATA_LFLAG_SW_ACTIVITY; |
1400 | if (val == BLINK_OFF) { | 1417 | if (val == BLINK_OFF) { |
1401 | /* set LED to ON for idle */ | 1418 | /* set LED to ON for idle */ |
1402 | port_led_state &= 0xfff80000; | 1419 | port_led_state &= EM_MSG_LED_VALUE_OFF; |
1403 | port_led_state |= (ap->port_no | (link->pmp << 8)); | 1420 | port_led_state |= (ap->port_no | (link->pmp << 8)); |
1404 | port_led_state |= 0x00010000; /* check this */ | 1421 | port_led_state |= EM_MSG_LED_VALUE_ON; /* check this */ |
1405 | ahci_transmit_led_message(ap, port_led_state, 4); | 1422 | ahci_transmit_led_message(ap, port_led_state, 4); |
1406 | } | 1423 | } |
1407 | } | 1424 | } |
@@ -2612,7 +2629,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2612 | u32 em_loc = readl(mmio + HOST_EM_LOC); | 2629 | u32 em_loc = readl(mmio + HOST_EM_LOC); |
2613 | u32 em_ctl = readl(mmio + HOST_EM_CTL); | 2630 | u32 em_ctl = readl(mmio + HOST_EM_CTL); |
2614 | 2631 | ||
2615 | messages = (em_ctl & 0x000f0000) >> 16; | 2632 | messages = (em_ctl & EM_CTRL_MSG_TYPE) >> 16; |
2616 | 2633 | ||
2617 | /* we only support LED message type right now */ | 2634 | /* we only support LED message type right now */ |
2618 | if ((messages & 0x01) && (ahci_em_messages == 1)) { | 2635 | if ((messages & 0x01) && (ahci_em_messages == 1)) { |
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c index 75a406f5e694..5c33767e66de 100644 --- a/drivers/ata/ata_generic.c +++ b/drivers/ata/ata_generic.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * ata_generic.c - Generic PATA/SATA controller driver. | 2 | * ata_generic.c - Generic PATA/SATA controller driver. |
3 | * Copyright 2005 Red Hat Inc <alan@redhat.com>, all rights reserved. | 3 | * Copyright 2005 Red Hat Inc, all rights reserved. |
4 | * | 4 | * |
5 | * Elements from ide/pci/generic.c | 5 | * Elements from ide/pci/generic.c |
6 | * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> | 6 | * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index e9e32ed6b1a3..52dc2d8b8f22 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * | 14 | * |
15 | * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer | 15 | * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer |
16 | * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> | 16 | * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> |
17 | * Copyright (C) 2003 Red Hat Inc <alan@redhat.com> | 17 | * Copyright (C) 2003 Red Hat Inc |
18 | * | 18 | * |
19 | * | 19 | * |
20 | * This program is free software; you can redistribute it and/or modify | 20 | * This program is free software; you can redistribute it and/or modify |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 8cb0b360bfd8..2ff633c119e2 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4156,29 +4156,33 @@ static int cable_is_40wire(struct ata_port *ap) | |||
4156 | struct ata_link *link; | 4156 | struct ata_link *link; |
4157 | struct ata_device *dev; | 4157 | struct ata_device *dev; |
4158 | 4158 | ||
4159 | /* If the controller thinks we are 40 wire, we are */ | 4159 | /* If the controller thinks we are 40 wire, we are. */ |
4160 | if (ap->cbl == ATA_CBL_PATA40) | 4160 | if (ap->cbl == ATA_CBL_PATA40) |
4161 | return 1; | 4161 | return 1; |
4162 | /* If the controller thinks we are 80 wire, we are */ | 4162 | |
4163 | /* If the controller thinks we are 80 wire, we are. */ | ||
4163 | if (ap->cbl == ATA_CBL_PATA80 || ap->cbl == ATA_CBL_SATA) | 4164 | if (ap->cbl == ATA_CBL_PATA80 || ap->cbl == ATA_CBL_SATA) |
4164 | return 0; | 4165 | return 0; |
4165 | /* If the system is known to be 40 wire short cable (eg laptop), | 4166 | |
4166 | then we allow 80 wire modes even if the drive isn't sure */ | 4167 | /* If the system is known to be 40 wire short cable (eg |
4168 | * laptop), then we allow 80 wire modes even if the drive | ||
4169 | * isn't sure. | ||
4170 | */ | ||
4167 | if (ap->cbl == ATA_CBL_PATA40_SHORT) | 4171 | if (ap->cbl == ATA_CBL_PATA40_SHORT) |
4168 | return 0; | 4172 | return 0; |
4169 | /* If the controller doesn't know we scan | 4173 | |
4170 | 4174 | /* If the controller doesn't know, we scan. | |
4171 | - Note: We look for all 40 wire detects at this point. | 4175 | * |
4172 | Any 80 wire detect is taken to be 80 wire cable | 4176 | * Note: We look for all 40 wire detects at this point. Any |
4173 | because | 4177 | * 80 wire detect is taken to be 80 wire cable because |
4174 | - In many setups only the one drive (slave if present) | 4178 | * - in many setups only the one drive (slave if present) will |
4175 | will give a valid detect | 4179 | * give a valid detect |
4176 | - If you have a non detect capable drive you don't | 4180 | * - if you have a non detect capable drive you don't want it |
4177 | want it to colour the choice | 4181 | * to colour the choice |
4178 | */ | 4182 | */ |
4179 | ata_port_for_each_link(link, ap) { | 4183 | ata_port_for_each_link(link, ap) { |
4180 | ata_link_for_each_dev(dev, link) { | 4184 | ata_link_for_each_dev(dev, link) { |
4181 | if (!ata_is_40wire(dev)) | 4185 | if (ata_dev_enabled(dev) && !ata_is_40wire(dev)) |
4182 | return 0; | 4186 | return 0; |
4183 | } | 4187 | } |
4184 | } | 4188 | } |
@@ -4553,6 +4557,7 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) | |||
4553 | /** | 4557 | /** |
4554 | * ata_qc_new_init - Request an available ATA command, and initialize it | 4558 | * ata_qc_new_init - Request an available ATA command, and initialize it |
4555 | * @dev: Device from whom we request an available command structure | 4559 | * @dev: Device from whom we request an available command structure |
4560 | * @tag: command tag | ||
4556 | * | 4561 | * |
4557 | * LOCKING: | 4562 | * LOCKING: |
4558 | * None. | 4563 | * None. |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 5d687d7cffae..8077bdf5d30d 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -603,6 +603,9 @@ void ata_scsi_error(struct Scsi_Host *host) | |||
603 | ata_link_for_each_dev(dev, link) { | 603 | ata_link_for_each_dev(dev, link) { |
604 | int devno = dev->devno; | 604 | int devno = dev->devno; |
605 | 605 | ||
606 | if (!ata_dev_enabled(dev)) | ||
607 | continue; | ||
608 | |||
606 | ehc->saved_xfer_mode[devno] = dev->xfer_mode; | 609 | ehc->saved_xfer_mode[devno] = dev->xfer_mode; |
607 | if (ata_ncq_enabled(dev)) | 610 | if (ata_ncq_enabled(dev)) |
608 | ehc->saved_ncq_enabled |= 1 << devno; | 611 | ehc->saved_ncq_enabled |= 1 << devno; |
@@ -1161,6 +1164,7 @@ void ata_eh_detach_dev(struct ata_device *dev) | |||
1161 | { | 1164 | { |
1162 | struct ata_link *link = dev->link; | 1165 | struct ata_link *link = dev->link; |
1163 | struct ata_port *ap = link->ap; | 1166 | struct ata_port *ap = link->ap; |
1167 | struct ata_eh_context *ehc = &link->eh_context; | ||
1164 | unsigned long flags; | 1168 | unsigned long flags; |
1165 | 1169 | ||
1166 | ata_dev_disable(dev); | 1170 | ata_dev_disable(dev); |
@@ -1174,9 +1178,11 @@ void ata_eh_detach_dev(struct ata_device *dev) | |||
1174 | ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG; | 1178 | ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG; |
1175 | } | 1179 | } |
1176 | 1180 | ||
1177 | /* clear per-dev EH actions */ | 1181 | /* clear per-dev EH info */ |
1178 | ata_eh_clear_action(link, dev, &link->eh_info, ATA_EH_PERDEV_MASK); | 1182 | ata_eh_clear_action(link, dev, &link->eh_info, ATA_EH_PERDEV_MASK); |
1179 | ata_eh_clear_action(link, dev, &link->eh_context.i, ATA_EH_PERDEV_MASK); | 1183 | ata_eh_clear_action(link, dev, &link->eh_context.i, ATA_EH_PERDEV_MASK); |
1184 | ehc->saved_xfer_mode[dev->devno] = 0; | ||
1185 | ehc->saved_ncq_enabled &= ~(1 << dev->devno); | ||
1180 | 1186 | ||
1181 | spin_unlock_irqrestore(ap->lock, flags); | 1187 | spin_unlock_irqrestore(ap->lock, flags); |
1182 | } | 1188 | } |
@@ -2787,6 +2793,9 @@ int ata_set_mode(struct ata_link *link, struct ata_device **r_failed_dev) | |||
2787 | 2793 | ||
2788 | /* if data transfer is verified, clear DUBIOUS_XFER on ering top */ | 2794 | /* if data transfer is verified, clear DUBIOUS_XFER on ering top */ |
2789 | ata_link_for_each_dev(dev, link) { | 2795 | ata_link_for_each_dev(dev, link) { |
2796 | if (!ata_dev_enabled(dev)) | ||
2797 | continue; | ||
2798 | |||
2790 | if (!(dev->flags & ATA_DFLAG_DUBIOUS_XFER)) { | 2799 | if (!(dev->flags & ATA_DFLAG_DUBIOUS_XFER)) { |
2791 | struct ata_ering_entry *ent; | 2800 | struct ata_ering_entry *ent; |
2792 | 2801 | ||
@@ -2808,6 +2817,9 @@ int ata_set_mode(struct ata_link *link, struct ata_device **r_failed_dev) | |||
2808 | u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno]; | 2817 | u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno]; |
2809 | u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno)); | 2818 | u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno)); |
2810 | 2819 | ||
2820 | if (!ata_dev_enabled(dev)) | ||
2821 | continue; | ||
2822 | |||
2811 | if (dev->xfer_mode != saved_xfer_mode || | 2823 | if (dev->xfer_mode != saved_xfer_mode || |
2812 | ata_ncq_enabled(dev) != saved_ncq) | 2824 | ata_ncq_enabled(dev) != saved_ncq) |
2813 | dev->flags |= ATA_DFLAG_DUBIOUS_XFER; | 2825 | dev->flags |= ATA_DFLAG_DUBIOUS_XFER; |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 4b95c4387e9e..bbb30d882f05 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1107,6 +1107,15 @@ static int ata_scsi_dev_config(struct scsi_device *sdev, | |||
1107 | 1107 | ||
1108 | depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); | 1108 | depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); |
1109 | depth = min(ATA_MAX_QUEUE - 1, depth); | 1109 | depth = min(ATA_MAX_QUEUE - 1, depth); |
1110 | |||
1111 | /* | ||
1112 | * If this device is behind a port multiplier, we have | ||
1113 | * to share the tag map between all devices on that PMP. | ||
1114 | * Set up the shared tag map here and we get automatic. | ||
1115 | */ | ||
1116 | if (dev->link->ap->pmp_link) | ||
1117 | scsi_init_shared_tag_map(sdev->host, ATA_MAX_QUEUE - 1); | ||
1118 | |||
1110 | scsi_set_tag_type(sdev, MSG_SIMPLE_TAG); | 1119 | scsi_set_tag_type(sdev, MSG_SIMPLE_TAG); |
1111 | scsi_activate_tcq(sdev, depth); | 1120 | scsi_activate_tcq(sdev, depth); |
1112 | } | 1121 | } |
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c index eb919c16a03e..e2e332d8ff95 100644 --- a/drivers/ata/pata_acpi.c +++ b/drivers/ata/pata_acpi.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ACPI PATA driver | 2 | * ACPI PATA driver |
3 | * | 3 | * |
4 | * (c) 2007 Red Hat <alan@redhat.com> | 4 | * (c) 2007 Red Hat |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 5ca70fa1f587..73c466e452ca 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_ali.c - ALI 15x3 PATA for new ATA layer | 2 | * pata_ali.c - ALI 15x3 PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * based in part upon | 5 | * based in part upon |
7 | * linux/drivers/ide/pci/alim15x3.c Version 0.17 2003/01/02 | 6 | * linux/drivers/ide/pci/alim15x3.c Version 0.17 2003/01/02 |
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 57dd00f463d3..0ec9c7d9fe9d 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_amd.c - AMD PATA for new ATA layer | 2 | * pata_amd.c - AMD PATA for new ATA layer |
3 | * (C) 2005-2006 Red Hat Inc | 3 | * (C) 2005-2006 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * Based on pata-sil680. Errata information is taken from data sheets | 5 | * Based on pata-sil680. Errata information is taken from data sheets |
7 | * and the amd74xx.c driver by Vojtech Pavlik. Nvidia SATA devices are | 6 | * and the amd74xx.c driver by Vojtech Pavlik. Nvidia SATA devices are |
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index 0f513bc11193..6b3092c75ffe 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_artop.c - ARTOP ATA controller driver | 2 | * pata_artop.c - ARTOP ATA controller driver |
3 | * | 3 | * |
4 | * (C) 2006 Red Hat <alan@redhat.com> | 4 | * (C) 2006 Red Hat |
5 | * (C) 2007 Bartlomiej Zolnierkiewicz | 5 | * (C) 2007 Bartlomiej Zolnierkiewicz |
6 | * | 6 | * |
7 | * Based in part on drivers/ide/pci/aec62xx.c | 7 | * Based in part on drivers/ide/pci/aec62xx.c |
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index e8a0d99d7356..0e2cde8f9973 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_atiixp.c - ATI PATA for new ATA layer | 2 | * pata_atiixp.c - ATI PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * Based on | 5 | * Based on |
7 | * | 6 | * |
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c index 2de30b990278..34a394264c3d 100644 --- a/drivers/ata/pata_cmd640.c +++ b/drivers/ata/pata_cmd640.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_cmd640.c - CMD640 PCI PATA for new ATA layer | 2 | * pata_cmd640.c - CMD640 PCI PATA for new ATA layer |
3 | * (C) 2007 Red Hat Inc | 3 | * (C) 2007 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * Based upon | 5 | * Based upon |
7 | * linux/drivers/ide/pci/cmd640.c Version 1.02 Sep 01, 1996 | 6 | * linux/drivers/ide/pci/cmd640.c Version 1.02 Sep 01, 1996 |
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index ddd09b7d98c9..3167d8fed2f2 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_cmd64x.c - CMD64x PATA for new ATA layer | 2 | * pata_cmd64x.c - CMD64x PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | 4 | * Alan Cox <alan@lxorguk.ukuu.org.uk> |
5 | * | 5 | * |
6 | * Based upon | 6 | * Based upon |
7 | * linux/drivers/ide/pci/cmd64x.c Version 1.30 Sept 10, 2002 | 7 | * linux/drivers/ide/pci/cmd64x.c Version 1.30 Sept 10, 2002 |
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c index 0c4b271a9d5a..bba453381f44 100644 --- a/drivers/ata/pata_cs5530.c +++ b/drivers/ata/pata_cs5530.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata-cs5530.c - CS5530 PATA for new ATA layer | 2 | * pata-cs5530.c - CS5530 PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * based upon cs5530.c by Mark Lord. | 5 | * based upon cs5530.c by Mark Lord. |
7 | * | 6 | * |
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c index f1b6556f0483..1b2d4a0f5f74 100644 --- a/drivers/ata/pata_cs5535.c +++ b/drivers/ata/pata_cs5535.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata-cs5535.c - CS5535 PATA for new ATA layer | 2 | * pata-cs5535.c - CS5535 PATA for new ATA layer |
3 | * (C) 2005-2006 Red Hat Inc | 3 | * (C) 2005-2006 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | 4 | * Alan Cox <alan@lxorguk.ukuu.org.uk> |
5 | * | 5 | * |
6 | * based upon cs5535.c from AMD <Jens.Altmann@amd.com> as cleaned up and | 6 | * based upon cs5535.c from AMD <Jens.Altmann@amd.com> as cleaned up and |
7 | * made readable and Linux style by Wolfgang Zuleger <wolfgang.zuleger@gmx.de | 7 | * made readable and Linux style by Wolfgang Zuleger <wolfgang.zuleger@gmx.de |
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c index 2ff62608ae37..d546425cd380 100644 --- a/drivers/ata/pata_cypress.c +++ b/drivers/ata/pata_cypress.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_cypress.c - Cypress PATA for new ATA layer | 2 | * pata_cypress.c - Cypress PATA for new ATA layer |
3 | * (C) 2006 Red Hat Inc | 3 | * (C) 2006 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | 4 | * Alan Cox |
5 | * | 5 | * |
6 | * Based heavily on | 6 | * Based heavily on |
7 | * linux/drivers/ide/pci/cy82c693.c Version 0.40 Sep. 10, 2002 | 7 | * linux/drivers/ide/pci/cy82c693.c Version 0.40 Sep. 10, 2002 |
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index 9fba82976ba6..ac6392ea35b0 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_efar.c - EFAR PIIX clone controller driver | 2 | * pata_efar.c - EFAR PIIX clone controller driver |
3 | * | 3 | * |
4 | * (C) 2005 Red Hat <alan@redhat.com> | 4 | * (C) 2005 Red Hat |
5 | * | 5 | * |
6 | * Some parts based on ata_piix.c by Jeff Garzik and others. | 6 | * Some parts based on ata_piix.c by Jeff Garzik and others. |
7 | * | 7 | * |
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c index 6a111baab523..15cdb9148aab 100644 --- a/drivers/ata/pata_isapnp.c +++ b/drivers/ata/pata_isapnp.c | |||
@@ -1,7 +1,7 @@ | |||
1 | 1 | ||
2 | /* | 2 | /* |
3 | * pata-isapnp.c - ISA PnP PATA controller driver. | 3 | * pata-isapnp.c - ISA PnP PATA controller driver. |
4 | * Copyright 2005/2006 Red Hat Inc <alan@redhat.com>, all rights reserved. | 4 | * Copyright 2005/2006 Red Hat Inc, all rights reserved. |
5 | * | 5 | * |
6 | * Based in part on ide-pnp.c by Andrey Panin <pazke@donpac.ru> | 6 | * Based in part on ide-pnp.c by Andrey Panin <pazke@donpac.ru> |
7 | */ | 7 | */ |
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 0221c9a46769..860ede526282 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_it821x.c - IT821x PATA for new ATA layer | 2 | * pata_it821x.c - IT821x PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | 4 | * Alan Cox <alan@lxorguk.ukuu.org.uk> |
5 | * (C) 2007 Bartlomiej Zolnierkiewicz | 5 | * (C) 2007 Bartlomiej Zolnierkiewicz |
6 | * | 6 | * |
7 | * based upon | 7 | * based upon |
@@ -10,7 +10,7 @@ | |||
10 | * | 10 | * |
11 | * linux/drivers/ide/pci/it821x.c Version 0.09 December 2004 | 11 | * linux/drivers/ide/pci/it821x.c Version 0.09 December 2004 |
12 | * | 12 | * |
13 | * Copyright (C) 2004 Red Hat <alan@redhat.com> | 13 | * Copyright (C) 2004 Red Hat |
14 | * | 14 | * |
15 | * May be copied or modified under the terms of the GNU General Public License | 15 | * May be copied or modified under the terms of the GNU General Public License |
16 | * Based in part on the ITE vendor provided SCSI driver. | 16 | * Based in part on the ITE vendor provided SCSI driver. |
@@ -557,9 +557,8 @@ static unsigned int it821x_read_id(struct ata_device *adev, | |||
557 | if (strstr(model_num, "Integrated Technology Express")) { | 557 | if (strstr(model_num, "Integrated Technology Express")) { |
558 | /* Set feature bits the firmware neglects */ | 558 | /* Set feature bits the firmware neglects */ |
559 | id[49] |= 0x0300; /* LBA, DMA */ | 559 | id[49] |= 0x0300; /* LBA, DMA */ |
560 | id[82] |= 0x0400; /* LBA48 */ | ||
561 | id[83] &= 0x7FFF; | 560 | id[83] &= 0x7FFF; |
562 | id[83] |= 0x4000; /* Word 83 is valid */ | 561 | id[83] |= 0x4400; /* Word 83 is valid and LBA48 */ |
563 | id[86] |= 0x0400; /* LBA48 on */ | 562 | id[86] |= 0x0400; /* LBA48 on */ |
564 | id[ATA_ID_MAJOR_VER] |= 0x1F; | 563 | id[ATA_ID_MAJOR_VER] |= 0x1F; |
565 | } | 564 | } |
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index 73b7596816b4..38cf1ab2d289 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * driven by AHCI in the usual configuration although | 4 | * driven by AHCI in the usual configuration although |
5 | * this driver can handle other setups if we need it. | 5 | * this driver can handle other setups if we need it. |
6 | * | 6 | * |
7 | * (c) 2006 Red Hat <alan@redhat.com> | 7 | * (c) 2006 Red Hat |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index bc037ffce200..930c2208640b 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata-legacy.c - Legacy port PATA/SATA controller driver. | 2 | * pata-legacy.c - Legacy port PATA/SATA controller driver. |
3 | * Copyright 2005/2006 Red Hat <alan@redhat.com>, all rights reserved. | 3 | * Copyright 2005/2006 Red Hat, all rights reserved. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index 0d87eec84966..76e399bf8c1b 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * isn't making full use of the device functionality but it is | 5 | * isn't making full use of the device functionality but it is |
6 | * easy to get working. | 6 | * easy to get working. |
7 | * | 7 | * |
8 | * (c) 2006 Red Hat <alan@redhat.com> | 8 | * (c) 2006 Red Hat |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c index 7d7e3fdab71f..7c8faa48b5f3 100644 --- a/drivers/ata/pata_mpiix.c +++ b/drivers/ata/pata_mpiix.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_mpiix.c - Intel MPIIX PATA for new ATA layer | 2 | * pata_mpiix.c - Intel MPIIX PATA for new ATA layer |
3 | * (C) 2005-2006 Red Hat Inc | 3 | * (C) 2005-2006 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | 4 | * Alan Cox <alan@lxorguk.ukuu.org.uk> |
5 | * | 5 | * |
6 | * The MPIIX is different enough to the PIIX4 and friends that we give it | 6 | * The MPIIX is different enough to the PIIX4 and friends that we give it |
7 | * a separate driver. The old ide/pci code handles this by just not tuning | 7 | * a separate driver. The old ide/pci code handles this by just not tuning |
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c index d9719c8b9dbe..9dc05e1656a8 100644 --- a/drivers/ata/pata_netcell.c +++ b/drivers/ata/pata_netcell.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_netcell.c - Netcell PATA driver | 2 | * pata_netcell.c - Netcell PATA driver |
3 | * | 3 | * |
4 | * (c) 2006 Red Hat <alan@redhat.com> | 4 | * (c) 2006 Red Hat |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c index 565e67cd13fa..4e466eae8b46 100644 --- a/drivers/ata/pata_ninja32.c +++ b/drivers/ata/pata_ninja32.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_ninja32.c - Ninja32 PATA for new ATA layer | 2 | * pata_ninja32.c - Ninja32 PATA for new ATA layer |
3 | * (C) 2007 Red Hat Inc | 3 | * (C) 2007 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * Note: The controller like many controllers has shared timings for | 5 | * Note: The controller like many controllers has shared timings for |
7 | * PIO and DMA. We thus flip to the DMA timings in dma_start and flip back | 6 | * PIO and DMA. We thus flip to the DMA timings in dma_start and flip back |
@@ -45,7 +44,7 @@ | |||
45 | #include <linux/libata.h> | 44 | #include <linux/libata.h> |
46 | 45 | ||
47 | #define DRV_NAME "pata_ninja32" | 46 | #define DRV_NAME "pata_ninja32" |
48 | #define DRV_VERSION "0.0.1" | 47 | #define DRV_VERSION "0.1.1" |
49 | 48 | ||
50 | 49 | ||
51 | /** | 50 | /** |
@@ -89,6 +88,17 @@ static struct ata_port_operations ninja32_port_ops = { | |||
89 | .set_piomode = ninja32_set_piomode, | 88 | .set_piomode = ninja32_set_piomode, |
90 | }; | 89 | }; |
91 | 90 | ||
91 | static void ninja32_program(void __iomem *base) | ||
92 | { | ||
93 | iowrite8(0x05, base + 0x01); /* Enable interrupt lines */ | ||
94 | iowrite8(0xBE, base + 0x02); /* Burst, ?? setup */ | ||
95 | iowrite8(0x01, base + 0x03); /* Unknown */ | ||
96 | iowrite8(0x20, base + 0x04); /* WAIT0 */ | ||
97 | iowrite8(0x8f, base + 0x05); /* Unknown */ | ||
98 | iowrite8(0xa4, base + 0x1c); /* Unknown */ | ||
99 | iowrite8(0x83, base + 0x1d); /* BMDMA control: WAIT0 */ | ||
100 | } | ||
101 | |||
92 | static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 102 | static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
93 | { | 103 | { |
94 | struct ata_host *host; | 104 | struct ata_host *host; |
@@ -134,18 +144,28 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
134 | ap->ioaddr.bmdma_addr = base; | 144 | ap->ioaddr.bmdma_addr = base; |
135 | ata_sff_std_ports(&ap->ioaddr); | 145 | ata_sff_std_ports(&ap->ioaddr); |
136 | 146 | ||
137 | iowrite8(0x05, base + 0x01); /* Enable interrupt lines */ | 147 | ninja32_program(base); |
138 | iowrite8(0xBE, base + 0x02); /* Burst, ?? setup */ | ||
139 | iowrite8(0x01, base + 0x03); /* Unknown */ | ||
140 | iowrite8(0x20, base + 0x04); /* WAIT0 */ | ||
141 | iowrite8(0x8f, base + 0x05); /* Unknown */ | ||
142 | iowrite8(0xa4, base + 0x1c); /* Unknown */ | ||
143 | iowrite8(0x83, base + 0x1d); /* BMDMA control: WAIT0 */ | ||
144 | /* FIXME: Should we disable them at remove ? */ | 148 | /* FIXME: Should we disable them at remove ? */ |
145 | return ata_host_activate(host, dev->irq, ata_sff_interrupt, | 149 | return ata_host_activate(host, dev->irq, ata_sff_interrupt, |
146 | IRQF_SHARED, &ninja32_sht); | 150 | IRQF_SHARED, &ninja32_sht); |
147 | } | 151 | } |
148 | 152 | ||
153 | #ifdef CONFIG_PM | ||
154 | |||
155 | static int ninja32_reinit_one(struct pci_dev *pdev) | ||
156 | { | ||
157 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | ||
158 | int rc; | ||
159 | |||
160 | rc = ata_pci_device_do_resume(pdev); | ||
161 | if (rc) | ||
162 | return rc; | ||
163 | ninja32_program(host->iomap[0]); | ||
164 | ata_host_resume(host); | ||
165 | return 0; | ||
166 | } | ||
167 | #endif | ||
168 | |||
149 | static const struct pci_device_id ninja32[] = { | 169 | static const struct pci_device_id ninja32[] = { |
150 | { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 170 | { 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
151 | { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 171 | { 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
@@ -156,7 +176,11 @@ static struct pci_driver ninja32_pci_driver = { | |||
156 | .name = DRV_NAME, | 176 | .name = DRV_NAME, |
157 | .id_table = ninja32, | 177 | .id_table = ninja32, |
158 | .probe = ninja32_init_one, | 178 | .probe = ninja32_init_one, |
159 | .remove = ata_pci_remove_one | 179 | .remove = ata_pci_remove_one, |
180 | #ifdef CONFIG_PM | ||
181 | .suspend = ata_pci_device_suspend, | ||
182 | .resume = ninja32_reinit_one, | ||
183 | #endif | ||
160 | }; | 184 | }; |
161 | 185 | ||
162 | static int __init ninja32_init(void) | 186 | static int __init ninja32_init(void) |
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c index be756b7ef07e..40d411c460de 100644 --- a/drivers/ata/pata_ns87410.c +++ b/drivers/ata/pata_ns87410.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_ns87410.c - National Semiconductor 87410 PATA for new ATA layer | 2 | * pata_ns87410.c - National Semiconductor 87410 PATA for new ATA layer |
3 | * (C) 2006 Red Hat Inc | 3 | * (C) 2006 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index e0aa7eaaee0a..89bf5f865d6a 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_ns87415.c - NS87415 (non PARISC) PATA | 2 | * pata_ns87415.c - NS87415 (non PARISC) PATA |
3 | * | 3 | * |
4 | * (C) 2005 Red Hat <alan@redhat.com> | 4 | * (C) 2005 Red Hat <alan@lxorguk.ukuu.org.uk> |
5 | * | 5 | * |
6 | * This is a fairly generic MWDMA controller. It has some limitations | 6 | * This is a fairly generic MWDMA controller. It has some limitations |
7 | * as it requires timing reloads on PIO/DMA transitions but it is otherwise | 7 | * as it requires timing reloads on PIO/DMA transitions but it is otherwise |
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c index df64f2443001..c0dbc46a348e 100644 --- a/drivers/ata/pata_oldpiix.c +++ b/drivers/ata/pata_oldpiix.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_oldpiix.c - Intel PATA/SATA controllers | 2 | * pata_oldpiix.c - Intel PATA/SATA controllers |
3 | * | 3 | * |
4 | * (C) 2005 Red Hat <alan@redhat.com> | 4 | * (C) 2005 Red Hat |
5 | * | 5 | * |
6 | * Some parts based on ata_piix.c by Jeff Garzik and others. | 6 | * Some parts based on ata_piix.c by Jeff Garzik and others. |
7 | * | 7 | * |
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c index fb2cf661b0e8..e4fa4d565e96 100644 --- a/drivers/ata/pata_opti.c +++ b/drivers/ata/pata_opti.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_opti.c - ATI PATA for new ATA layer | 2 | * pata_opti.c - ATI PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * Based on | 5 | * Based on |
7 | * linux/drivers/ide/pci/opti621.c Version 0.7 Sept 10, 2002 | 6 | * linux/drivers/ide/pci/opti621.c Version 0.7 Sept 10, 2002 |
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c index 4cd744456313..93bb6e91973f 100644 --- a/drivers/ata/pata_optidma.c +++ b/drivers/ata/pata_optidma.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_optidma.c - Opti DMA PATA for new ATA layer | 2 | * pata_optidma.c - Opti DMA PATA for new ATA layer |
3 | * (C) 2006 Red Hat Inc | 3 | * (C) 2006 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * The Opti DMA controllers are related to the older PIO PCI controllers | 5 | * The Opti DMA controllers are related to the older PIO PCI controllers |
7 | * and indeed the VLB ones. The main differences are that the timing | 6 | * and indeed the VLB ones. The main differences are that the timing |
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 02b596b9cf6a..271cb64d429e 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_pcmcia.c - PCMCIA PATA controller driver. | 2 | * pata_pcmcia.c - PCMCIA PATA controller driver. |
3 | * Copyright 2005-2006 Red Hat Inc <alan@redhat.com>, all rights reserved. | 3 | * Copyright 2005-2006 Red Hat Inc, all rights reserved. |
4 | * PCMCIA ident update Copyright 2006 Marcin Juszkiewicz | 4 | * PCMCIA ident update Copyright 2006 Marcin Juszkiewicz |
5 | * <openembedded@hrw.one.pl> | 5 | * <openembedded@hrw.one.pl> |
6 | * | 6 | * |
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index d2673060bc8d..799a6a098712 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_pdc202xx_old.c - Promise PDC202xx PATA for new ATA layer | 2 | * pata_pdc202xx_old.c - Promise PDC202xx PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | 4 | * Alan Cox <alan@lxorguk.ukuu.org.uk> |
5 | * (C) 2007 Bartlomiej Zolnierkiewicz | 5 | * (C) 2007 Bartlomiej Zolnierkiewicz |
6 | * | 6 | * |
7 | * Based in part on linux/drivers/ide/pci/pdc202xx_old.c | 7 | * Based in part on linux/drivers/ide/pci/pdc202xx_old.c |
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c index 8f65ad61b8af..77e4e3b17f54 100644 --- a/drivers/ata/pata_platform.c +++ b/drivers/ata/pata_platform.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Based on pata_pcmcia: | 6 | * Based on pata_pcmcia: |
7 | * | 7 | * |
8 | * Copyright 2005-2006 Red Hat Inc <alan@redhat.com>, all rights reserved. | 8 | * Copyright 2005-2006 Red Hat Inc, all rights reserved. |
9 | * | 9 | * |
10 | * This file is subject to the terms and conditions of the GNU General Public | 10 | * This file is subject to the terms and conditions of the GNU General Public |
11 | * License. See the file "COPYING" in the main directory of this archive | 11 | * License. See the file "COPYING" in the main directory of this archive |
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index 63b7a1c165a5..3080f371222c 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_qdi.c - QDI VLB ATA controllers | 2 | * pata_qdi.c - QDI VLB ATA controllers |
3 | * (C) 2006 Red Hat <alan@redhat.com> | 3 | * (C) 2006 Red Hat |
4 | * | 4 | * |
5 | * This driver mostly exists as a proof of concept for non PCI devices under | 5 | * This driver mostly exists as a proof of concept for non PCI devices under |
6 | * libata. While the QDI6580 was 'neat' in 1993 it is no longer terribly | 6 | * libata. While the QDI6580 was 'neat' in 1993 it is no longer terribly |
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index 1c0d9fa7ee54..0b0aa452de14 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_radisys.c - Intel PATA/SATA controllers | 2 | * pata_radisys.c - Intel PATA/SATA controllers |
3 | * | 3 | * |
4 | * (C) 2006 Red Hat <alan@redhat.com> | 4 | * (C) 2006 Red Hat <alan@lxorguk.ukuu.org.uk> |
5 | * | 5 | * |
6 | * Some parts based on ata_piix.c by Jeff Garzik and others. | 6 | * Some parts based on ata_piix.c by Jeff Garzik and others. |
7 | * | 7 | * |
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index 0278fd2b8fb1..9a4bdca54616 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * New ATA layer SC1200 driver Alan Cox <alan@redhat.com> | 2 | * New ATA layer SC1200 driver Alan Cox <alan@lxorguk.ukuu.org.uk> |
3 | * | 3 | * |
4 | * TODO: Mode selection filtering | 4 | * TODO: Mode selection filtering |
5 | * TODO: Can't enable second channel until ATA core has serialize | 5 | * TODO: Can't enable second channel until ATA core has serialize |
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index 16673d168573..cf3707e516a2 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * Copyright 2003-2005 Jeff Garzik | 8 | * Copyright 2003-2005 Jeff Garzik |
9 | * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer | 9 | * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer |
10 | * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> | 10 | * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> |
11 | * Copyright (C) 2003 Red Hat Inc <alan@redhat.com> | 11 | * Copyright (C) 2003 Red Hat Inc |
12 | * | 12 | * |
13 | * and drivers/ata/ahci.c: | 13 | * and drivers/ata/ahci.c: |
14 | * Copyright 2004-2005 Red Hat, Inc. | 14 | * Copyright 2004-2005 Red Hat, Inc. |
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c index ffd26d0dc50d..72e41c9f969b 100644 --- a/drivers/ata/pata_serverworks.c +++ b/drivers/ata/pata_serverworks.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_serverworks.c - Serverworks PATA for new ATA layer | 2 | * pata_serverworks.c - Serverworks PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * based upon | 5 | * based upon |
7 | * | 6 | * |
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index a598bb36aafc..83580a59db58 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_sil680.c - SIL680 PATA for new ATA layer | 2 | * pata_sil680.c - SIL680 PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * based upon | 5 | * based upon |
7 | * | 6 | * |
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 26345d7b531c..d34236611752 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_sis.c - SiS ATA driver | 2 | * pata_sis.c - SiS ATA driver |
3 | * | 3 | * |
4 | * (C) 2005 Red Hat <alan@redhat.com> | 4 | * (C) 2005 Red Hat |
5 | * (C) 2007 Bartlomiej Zolnierkiewicz | 5 | * (C) 2007 Bartlomiej Zolnierkiewicz |
6 | * | 6 | * |
7 | * Based upon linux/drivers/ide/pci/sis5513.c | 7 | * Based upon linux/drivers/ide/pci/sis5513.c |
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index 69877bd81815..1b0e7b6d8ef5 100644 --- a/drivers/ata/pata_sl82c105.c +++ b/drivers/ata/pata_sl82c105.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_sl82c105.c - SL82C105 PATA for new ATA layer | 2 | * pata_sl82c105.c - SL82C105 PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * Based in part on linux/drivers/ide/pci/sl82c105.c | 5 | * Based in part on linux/drivers/ide/pci/sl82c105.c |
7 | * SL82C105/Winbond 553 IDE driver | 6 | * SL82C105/Winbond 553 IDE driver |
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c index b181261f2743..ef9597517cdd 100644 --- a/drivers/ata/pata_triflex.c +++ b/drivers/ata/pata_triflex.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pata_triflex.c - Compaq PATA for new ATA layer | 2 | * pata_triflex.c - Compaq PATA for new ATA layer |
3 | * (C) 2005 Red Hat Inc | 3 | * (C) 2005 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | 4 | * Alan Cox <alan@lxorguk.ukuu.org.uk> |
5 | * | 5 | * |
6 | * based upon | 6 | * based upon |
7 | * | 7 | * |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 8fdb2ce73210..681169c9c640 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_via.c - VIA PATA for new ATA layer | 2 | * pata_via.c - VIA PATA for new ATA layer |
3 | * (C) 2005-2006 Red Hat Inc | 3 | * (C) 2005-2006 Red Hat Inc |
4 | * Alan Cox <alan@redhat.com> | ||
5 | * | 4 | * |
6 | * Documentation | 5 | * Documentation |
7 | * Most chipset documentation available under NDA only | 6 | * Most chipset documentation available under NDA only |
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c index a7606b044a61..319e164a3d74 100644 --- a/drivers/ata/pata_winbond.c +++ b/drivers/ata/pata_winbond.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * pata_winbond.c - Winbond VLB ATA controllers | 2 | * pata_winbond.c - Winbond VLB ATA controllers |
3 | * (C) 2006 Red Hat <alan@redhat.com> | 3 | * (C) 2006 Red Hat |
4 | * | 4 | * |
5 | * Support for the Winbond 83759A when operating in advanced mode. | 5 | * Support for the Winbond 83759A when operating in advanced mode. |
6 | * Multichip mode is not currently supported. | 6 | * Multichip mode is not currently supported. |
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 4621807a1a6a..ccee930f1e12 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -1329,6 +1329,11 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1329 | } | 1329 | } |
1330 | } | 1330 | } |
1331 | 1331 | ||
1332 | /* Set max read request size to 4096. This slightly increases | ||
1333 | * write throughput for pci-e variants. | ||
1334 | */ | ||
1335 | pcie_set_readrq(pdev, 4096); | ||
1336 | |||
1332 | sil24_init_controller(host); | 1337 | sil24_init_controller(host); |
1333 | 1338 | ||
1334 | pci_set_master(pdev); | 1339 | pci_set_master(pdev); |
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index 58630cc1eff2..cda6c7cc944b 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c | |||
@@ -152,7 +152,7 @@ static int btsdio_rx_packet(struct btsdio_data *data) | |||
152 | 152 | ||
153 | err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4); | 153 | err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4); |
154 | if (err < 0) { | 154 | if (err < 0) { |
155 | kfree(skb); | 155 | kfree_skb(skb); |
156 | return err; | 156 | return err; |
157 | } | 157 | } |
158 | 158 | ||
diff --git a/drivers/char/hw_random/amd-rng.c b/drivers/char/hw_random/amd-rng.c index c422e870dc52..cd0ba51f7c80 100644 --- a/drivers/char/hw_random/amd-rng.c +++ b/drivers/char/hw_random/amd-rng.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * derived from | 11 | * derived from |
12 | * | 12 | * |
13 | * Hardware driver for the AMD 768 Random Number Generator (RNG) | 13 | * Hardware driver for the AMD 768 Random Number Generator (RNG) |
14 | * (c) Copyright 2001 Red Hat Inc <alan@redhat.com> | 14 | * (c) Copyright 2001 Red Hat Inc |
15 | * | 15 | * |
16 | * derived from | 16 | * derived from |
17 | * | 17 | * |
diff --git a/drivers/char/hw_random/geode-rng.c b/drivers/char/hw_random/geode-rng.c index fed4ef5569f5..64d513f68368 100644 --- a/drivers/char/hw_random/geode-rng.c +++ b/drivers/char/hw_random/geode-rng.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * derived from | 11 | * derived from |
12 | * | 12 | * |
13 | * Hardware driver for the AMD 768 Random Number Generator (RNG) | 13 | * Hardware driver for the AMD 768 Random Number Generator (RNG) |
14 | * (c) Copyright 2001 Red Hat Inc <alan@redhat.com> | 14 | * (c) Copyright 2001 Red Hat Inc |
15 | * | 15 | * |
16 | * derived from | 16 | * derived from |
17 | * | 17 | * |
diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c index 8a2fce0756ec..5dcbe603eca2 100644 --- a/drivers/char/hw_random/intel-rng.c +++ b/drivers/char/hw_random/intel-rng.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * derived from | 11 | * derived from |
12 | * | 12 | * |
13 | * Hardware driver for the AMD 768 Random Number Generator (RNG) | 13 | * Hardware driver for the AMD 768 Random Number Generator (RNG) |
14 | * (c) Copyright 2001 Red Hat Inc <alan@redhat.com> | 14 | * (c) Copyright 2001 Red Hat Inc |
15 | * | 15 | * |
16 | * derived from | 16 | * derived from |
17 | * | 17 | * |
diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c index 128202e18fc9..4e9573c1d39e 100644 --- a/drivers/char/hw_random/via-rng.c +++ b/drivers/char/hw_random/via-rng.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * derived from | 11 | * derived from |
12 | * | 12 | * |
13 | * Hardware driver for the AMD 768 Random Number Generator (RNG) | 13 | * Hardware driver for the AMD 768 Random Number Generator (RNG) |
14 | * (c) Copyright 2001 Red Hat Inc <alan@redhat.com> | 14 | * (c) Copyright 2001 Red Hat Inc |
15 | * | 15 | * |
16 | * derived from | 16 | * derived from |
17 | * | 17 | * |
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 251416f2148f..8e16bfbdcb3d 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c | |||
@@ -476,6 +476,7 @@ static int ar_context_add_page(struct ar_context *ctx) | |||
476 | if (ab == NULL) | 476 | if (ab == NULL) |
477 | return -ENOMEM; | 477 | return -ENOMEM; |
478 | 478 | ||
479 | ab->next = NULL; | ||
479 | memset(&ab->descriptor, 0, sizeof(ab->descriptor)); | 480 | memset(&ab->descriptor, 0, sizeof(ab->descriptor)); |
480 | ab->descriptor.control = cpu_to_le16(DESCRIPTOR_INPUT_MORE | | 481 | ab->descriptor.control = cpu_to_le16(DESCRIPTOR_INPUT_MORE | |
481 | DESCRIPTOR_STATUS | | 482 | DESCRIPTOR_STATUS | |
@@ -496,6 +497,21 @@ static int ar_context_add_page(struct ar_context *ctx) | |||
496 | return 0; | 497 | return 0; |
497 | } | 498 | } |
498 | 499 | ||
500 | static void ar_context_release(struct ar_context *ctx) | ||
501 | { | ||
502 | struct ar_buffer *ab, *ab_next; | ||
503 | size_t offset; | ||
504 | dma_addr_t ab_bus; | ||
505 | |||
506 | for (ab = ctx->current_buffer; ab; ab = ab_next) { | ||
507 | ab_next = ab->next; | ||
508 | offset = offsetof(struct ar_buffer, data); | ||
509 | ab_bus = le32_to_cpu(ab->descriptor.data_address) - offset; | ||
510 | dma_free_coherent(ctx->ohci->card.device, PAGE_SIZE, | ||
511 | ab, ab_bus); | ||
512 | } | ||
513 | } | ||
514 | |||
499 | #if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) | 515 | #if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) |
500 | #define cond_le32_to_cpu(v) \ | 516 | #define cond_le32_to_cpu(v) \ |
501 | (ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v)) | 517 | (ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v)) |
@@ -2349,8 +2365,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2349 | 2365 | ||
2350 | ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); | 2366 | ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); |
2351 | if (ohci == NULL) { | 2367 | if (ohci == NULL) { |
2352 | fw_error("Could not malloc fw_ohci data.\n"); | 2368 | err = -ENOMEM; |
2353 | return -ENOMEM; | 2369 | goto fail; |
2354 | } | 2370 | } |
2355 | 2371 | ||
2356 | fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev); | 2372 | fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev); |
@@ -2359,7 +2375,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2359 | 2375 | ||
2360 | err = pci_enable_device(dev); | 2376 | err = pci_enable_device(dev); |
2361 | if (err) { | 2377 | if (err) { |
2362 | fw_error("Failed to enable OHCI hardware.\n"); | 2378 | fw_error("Failed to enable OHCI hardware\n"); |
2363 | goto fail_free; | 2379 | goto fail_free; |
2364 | } | 2380 | } |
2365 | 2381 | ||
@@ -2427,9 +2443,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2427 | ohci->ir_context_list = kzalloc(size, GFP_KERNEL); | 2443 | ohci->ir_context_list = kzalloc(size, GFP_KERNEL); |
2428 | 2444 | ||
2429 | if (ohci->it_context_list == NULL || ohci->ir_context_list == NULL) { | 2445 | if (ohci->it_context_list == NULL || ohci->ir_context_list == NULL) { |
2430 | fw_error("Out of memory for it/ir contexts.\n"); | ||
2431 | err = -ENOMEM; | 2446 | err = -ENOMEM; |
2432 | goto fail_registers; | 2447 | goto fail_contexts; |
2433 | } | 2448 | } |
2434 | 2449 | ||
2435 | /* self-id dma buffer allocation */ | 2450 | /* self-id dma buffer allocation */ |
@@ -2438,9 +2453,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2438 | &ohci->self_id_bus, | 2453 | &ohci->self_id_bus, |
2439 | GFP_KERNEL); | 2454 | GFP_KERNEL); |
2440 | if (ohci->self_id_cpu == NULL) { | 2455 | if (ohci->self_id_cpu == NULL) { |
2441 | fw_error("Out of memory for self ID buffer.\n"); | ||
2442 | err = -ENOMEM; | 2456 | err = -ENOMEM; |
2443 | goto fail_registers; | 2457 | goto fail_contexts; |
2444 | } | 2458 | } |
2445 | 2459 | ||
2446 | bus_options = reg_read(ohci, OHCI1394_BusOptions); | 2460 | bus_options = reg_read(ohci, OHCI1394_BusOptions); |
@@ -2460,9 +2474,13 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2460 | fail_self_id: | 2474 | fail_self_id: |
2461 | dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE, | 2475 | dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE, |
2462 | ohci->self_id_cpu, ohci->self_id_bus); | 2476 | ohci->self_id_cpu, ohci->self_id_bus); |
2463 | fail_registers: | 2477 | fail_contexts: |
2464 | kfree(ohci->it_context_list); | ||
2465 | kfree(ohci->ir_context_list); | 2478 | kfree(ohci->ir_context_list); |
2479 | kfree(ohci->it_context_list); | ||
2480 | context_release(&ohci->at_response_ctx); | ||
2481 | context_release(&ohci->at_request_ctx); | ||
2482 | ar_context_release(&ohci->ar_response_ctx); | ||
2483 | ar_context_release(&ohci->ar_request_ctx); | ||
2466 | pci_iounmap(dev, ohci->registers); | 2484 | pci_iounmap(dev, ohci->registers); |
2467 | fail_iomem: | 2485 | fail_iomem: |
2468 | pci_release_region(dev, 0); | 2486 | pci_release_region(dev, 0); |
@@ -2471,6 +2489,9 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2471 | fail_free: | 2489 | fail_free: |
2472 | kfree(&ohci->card); | 2490 | kfree(&ohci->card); |
2473 | ohci_pmac_off(dev); | 2491 | ohci_pmac_off(dev); |
2492 | fail: | ||
2493 | if (err == -ENOMEM) | ||
2494 | fw_error("Out of memory\n"); | ||
2474 | 2495 | ||
2475 | return err; | 2496 | return err; |
2476 | } | 2497 | } |
@@ -2491,8 +2512,19 @@ static void pci_remove(struct pci_dev *dev) | |||
2491 | 2512 | ||
2492 | software_reset(ohci); | 2513 | software_reset(ohci); |
2493 | free_irq(dev->irq, ohci); | 2514 | free_irq(dev->irq, ohci); |
2515 | |||
2516 | if (ohci->next_config_rom && ohci->next_config_rom != ohci->config_rom) | ||
2517 | dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, | ||
2518 | ohci->next_config_rom, ohci->next_config_rom_bus); | ||
2519 | if (ohci->config_rom) | ||
2520 | dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, | ||
2521 | ohci->config_rom, ohci->config_rom_bus); | ||
2494 | dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE, | 2522 | dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE, |
2495 | ohci->self_id_cpu, ohci->self_id_bus); | 2523 | ohci->self_id_cpu, ohci->self_id_bus); |
2524 | ar_context_release(&ohci->ar_request_ctx); | ||
2525 | ar_context_release(&ohci->ar_response_ctx); | ||
2526 | context_release(&ohci->at_request_ctx); | ||
2527 | context_release(&ohci->at_response_ctx); | ||
2496 | kfree(ohci->it_context_list); | 2528 | kfree(ohci->it_context_list); |
2497 | kfree(ohci->ir_context_list); | 2529 | kfree(ohci->ir_context_list); |
2498 | pci_iounmap(dev, ohci->registers); | 2530 | pci_iounmap(dev, ohci->registers); |
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index ef0b9b419c27..d334cac5e1fc 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -173,6 +173,9 @@ struct sbp2_target { | |||
173 | int blocked; /* ditto */ | 173 | int blocked; /* ditto */ |
174 | }; | 174 | }; |
175 | 175 | ||
176 | /* Impossible login_id, to detect logout attempt before successful login */ | ||
177 | #define INVALID_LOGIN_ID 0x10000 | ||
178 | |||
176 | /* | 179 | /* |
177 | * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be | 180 | * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be |
178 | * provided in the config rom. Most devices do provide a value, which | 181 | * provided in the config rom. Most devices do provide a value, which |
@@ -788,9 +791,20 @@ static void sbp2_release_target(struct kref *kref) | |||
788 | scsi_remove_device(sdev); | 791 | scsi_remove_device(sdev); |
789 | scsi_device_put(sdev); | 792 | scsi_device_put(sdev); |
790 | } | 793 | } |
791 | sbp2_send_management_orb(lu, tgt->node_id, lu->generation, | 794 | if (lu->login_id != INVALID_LOGIN_ID) { |
792 | SBP2_LOGOUT_REQUEST, lu->login_id, NULL); | 795 | int generation, node_id; |
793 | 796 | /* | |
797 | * tgt->node_id may be obsolete here if we failed | ||
798 | * during initial login or after a bus reset where | ||
799 | * the topology changed. | ||
800 | */ | ||
801 | generation = device->generation; | ||
802 | smp_rmb(); /* node_id vs. generation */ | ||
803 | node_id = device->node_id; | ||
804 | sbp2_send_management_orb(lu, node_id, generation, | ||
805 | SBP2_LOGOUT_REQUEST, | ||
806 | lu->login_id, NULL); | ||
807 | } | ||
794 | fw_core_remove_address_handler(&lu->address_handler); | 808 | fw_core_remove_address_handler(&lu->address_handler); |
795 | list_del(&lu->link); | 809 | list_del(&lu->link); |
796 | kfree(lu); | 810 | kfree(lu); |
@@ -805,19 +819,20 @@ static void sbp2_release_target(struct kref *kref) | |||
805 | 819 | ||
806 | static struct workqueue_struct *sbp2_wq; | 820 | static struct workqueue_struct *sbp2_wq; |
807 | 821 | ||
822 | static void sbp2_target_put(struct sbp2_target *tgt) | ||
823 | { | ||
824 | kref_put(&tgt->kref, sbp2_release_target); | ||
825 | } | ||
826 | |||
808 | /* | 827 | /* |
809 | * Always get the target's kref when scheduling work on one its units. | 828 | * Always get the target's kref when scheduling work on one its units. |
810 | * Each workqueue job is responsible to call sbp2_target_put() upon return. | 829 | * Each workqueue job is responsible to call sbp2_target_put() upon return. |
811 | */ | 830 | */ |
812 | static void sbp2_queue_work(struct sbp2_logical_unit *lu, unsigned long delay) | 831 | static void sbp2_queue_work(struct sbp2_logical_unit *lu, unsigned long delay) |
813 | { | 832 | { |
814 | if (queue_delayed_work(sbp2_wq, &lu->work, delay)) | 833 | kref_get(&lu->tgt->kref); |
815 | kref_get(&lu->tgt->kref); | 834 | if (!queue_delayed_work(sbp2_wq, &lu->work, delay)) |
816 | } | 835 | sbp2_target_put(lu->tgt); |
817 | |||
818 | static void sbp2_target_put(struct sbp2_target *tgt) | ||
819 | { | ||
820 | kref_put(&tgt->kref, sbp2_release_target); | ||
821 | } | 836 | } |
822 | 837 | ||
823 | /* | 838 | /* |
@@ -978,6 +993,7 @@ static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry) | |||
978 | 993 | ||
979 | lu->tgt = tgt; | 994 | lu->tgt = tgt; |
980 | lu->lun = lun_entry & 0xffff; | 995 | lu->lun = lun_entry & 0xffff; |
996 | lu->login_id = INVALID_LOGIN_ID; | ||
981 | lu->retries = 0; | 997 | lu->retries = 0; |
982 | lu->has_sdev = false; | 998 | lu->has_sdev = false; |
983 | lu->blocked = false; | 999 | lu->blocked = false; |
@@ -1147,7 +1163,7 @@ static int sbp2_probe(struct device *dev) | |||
1147 | 1163 | ||
1148 | /* Do the login in a workqueue so we can easily reschedule retries. */ | 1164 | /* Do the login in a workqueue so we can easily reschedule retries. */ |
1149 | list_for_each_entry(lu, &tgt->lu_list, link) | 1165 | list_for_each_entry(lu, &tgt->lu_list, link) |
1150 | sbp2_queue_work(lu, 0); | 1166 | sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5)); |
1151 | return 0; | 1167 | return 0; |
1152 | 1168 | ||
1153 | fail_tgt_put: | 1169 | fail_tgt_put: |
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c index c1b81077c4a8..5e204713002d 100644 --- a/drivers/firewire/fw-topology.c +++ b/drivers/firewire/fw-topology.c | |||
@@ -413,7 +413,7 @@ static void | |||
413 | update_tree(struct fw_card *card, struct fw_node *root) | 413 | update_tree(struct fw_card *card, struct fw_node *root) |
414 | { | 414 | { |
415 | struct list_head list0, list1; | 415 | struct list_head list0, list1; |
416 | struct fw_node *node0, *node1; | 416 | struct fw_node *node0, *node1, *next1; |
417 | int i, event; | 417 | int i, event; |
418 | 418 | ||
419 | INIT_LIST_HEAD(&list0); | 419 | INIT_LIST_HEAD(&list0); |
@@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct fw_node *root) | |||
485 | } | 485 | } |
486 | 486 | ||
487 | node0 = fw_node(node0->link.next); | 487 | node0 = fw_node(node0->link.next); |
488 | node1 = fw_node(node1->link.next); | 488 | next1 = fw_node(node1->link.next); |
489 | fw_node_put(node1); | ||
490 | node1 = next1; | ||
489 | } | 491 | } |
490 | } | 492 | } |
491 | 493 | ||
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index 027f58ce81ad..aed7dbb17cda 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -248,7 +248,7 @@ struct fw_card { | |||
248 | struct fw_node *local_node; | 248 | struct fw_node *local_node; |
249 | struct fw_node *root_node; | 249 | struct fw_node *root_node; |
250 | struct fw_node *irm_node; | 250 | struct fw_node *irm_node; |
251 | int color; | 251 | u8 color; /* must be u8 to match the definition in struct fw_node */ |
252 | int gap_count; | 252 | int gap_count; |
253 | bool beta_repeaters_present; | 253 | bool beta_repeaters_present; |
254 | 254 | ||
diff --git a/drivers/input/misc/sgi_btns.c b/drivers/input/misc/sgi_btns.c index ce238f59b3c8..be3a15f5b25d 100644 --- a/drivers/input/misc/sgi_btns.c +++ b/drivers/input/misc/sgi_btns.c | |||
@@ -174,5 +174,6 @@ static void __exit sgi_buttons_exit(void) | |||
174 | platform_driver_unregister(&sgi_buttons_driver); | 174 | platform_driver_unregister(&sgi_buttons_driver); |
175 | } | 175 | } |
176 | 176 | ||
177 | MODULE_LICENSE("GPL"); | ||
177 | module_init(sgi_buttons_init); | 178 | module_init(sgi_buttons_init); |
178 | module_exit(sgi_buttons_exit); | 179 | module_exit(sgi_buttons_exit); |
diff --git a/drivers/leds/leds-da903x.c b/drivers/leds/leds-da903x.c index f1fddb18d70d..1f3cc512eff8 100644 --- a/drivers/leds/leds-da903x.c +++ b/drivers/leds/leds-da903x.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/leds.h> | 19 | #include <linux/leds.h> |
20 | #include <linux/workqueue.h> | ||
20 | #include <linux/mfd/da903x.h> | 21 | #include <linux/mfd/da903x.h> |
21 | 22 | ||
22 | #define DA9030_LED1_CONTROL 0x20 | 23 | #define DA9030_LED1_CONTROL 0x20 |
@@ -57,7 +58,7 @@ static void da903x_led_work(struct work_struct *work) | |||
57 | offset = DA9030_LED_OFFSET(led->id); | 58 | offset = DA9030_LED_OFFSET(led->id); |
58 | val = led->flags & ~0x87; | 59 | val = led->flags & ~0x87; |
59 | val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */ | 60 | val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */ |
60 | val |= (led->new_brightness >> 5) & 0x7; /* PWM<2:0> */ | 61 | val |= (0x7 - (led->new_brightness >> 5)) & 0x7; /* PWM<2:0> */ |
61 | da903x_write(led->master, DA9030_LED1_CONTROL + offset, val); | 62 | da903x_write(led->master, DA9030_LED1_CONTROL + offset, val); |
62 | break; | 63 | break; |
63 | case DA9030_ID_VIBRA: | 64 | case DA9030_ID_VIBRA: |
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index 5749f22b296f..079e6aa874dc 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -328,7 +328,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, | |||
328 | lbs_deb_rx("rx err: frame received with bad length\n"); | 328 | lbs_deb_rx("rx err: frame received with bad length\n"); |
329 | priv->stats.rx_length_errors++; | 329 | priv->stats.rx_length_errors++; |
330 | ret = -EINVAL; | 330 | ret = -EINVAL; |
331 | kfree(skb); | 331 | kfree_skb(skb); |
332 | goto done; | 332 | goto done; |
333 | } | 333 | } |
334 | 334 | ||
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 023803dbb0c7..ae18baf59f06 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -76,7 +76,7 @@ tapeblock_trigger_requeue(struct tape_device *device) | |||
76 | static void | 76 | static void |
77 | tapeblock_end_request(struct request *req, int error) | 77 | tapeblock_end_request(struct request *req, int error) |
78 | { | 78 | { |
79 | if (__blk_end_request(req, error, blk_rq_bytes(req))) | 79 | if (blk_end_request(req, error, blk_rq_bytes(req))) |
80 | BUG(); | 80 | BUG(); |
81 | } | 81 | } |
82 | 82 | ||
@@ -166,7 +166,7 @@ tapeblock_requeue(struct work_struct *work) { | |||
166 | nr_queued++; | 166 | nr_queued++; |
167 | spin_unlock(get_ccwdev_lock(device->cdev)); | 167 | spin_unlock(get_ccwdev_lock(device->cdev)); |
168 | 168 | ||
169 | spin_lock(&device->blk_data.request_queue_lock); | 169 | spin_lock_irq(&device->blk_data.request_queue_lock); |
170 | while ( | 170 | while ( |
171 | !blk_queue_plugged(queue) && | 171 | !blk_queue_plugged(queue) && |
172 | elv_next_request(queue) && | 172 | elv_next_request(queue) && |
@@ -176,7 +176,9 @@ tapeblock_requeue(struct work_struct *work) { | |||
176 | if (rq_data_dir(req) == WRITE) { | 176 | if (rq_data_dir(req) == WRITE) { |
177 | DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); | 177 | DBF_EVENT(1, "TBLOCK: Rejecting write request\n"); |
178 | blkdev_dequeue_request(req); | 178 | blkdev_dequeue_request(req); |
179 | spin_unlock_irq(&device->blk_data.request_queue_lock); | ||
179 | tapeblock_end_request(req, -EIO); | 180 | tapeblock_end_request(req, -EIO); |
181 | spin_lock_irq(&device->blk_data.request_queue_lock); | ||
180 | continue; | 182 | continue; |
181 | } | 183 | } |
182 | blkdev_dequeue_request(req); | 184 | blkdev_dequeue_request(req); |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index d7073dbf825c..f9bb51fa7f5b 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -1200,7 +1200,7 @@ tape_open(struct tape_device *device) | |||
1200 | { | 1200 | { |
1201 | int rc; | 1201 | int rc; |
1202 | 1202 | ||
1203 | spin_lock(get_ccwdev_lock(device->cdev)); | 1203 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
1204 | if (device->tape_state == TS_NOT_OPER) { | 1204 | if (device->tape_state == TS_NOT_OPER) { |
1205 | DBF_EVENT(6, "TAPE:nodev\n"); | 1205 | DBF_EVENT(6, "TAPE:nodev\n"); |
1206 | rc = -ENODEV; | 1206 | rc = -ENODEV; |
@@ -1218,7 +1218,7 @@ tape_open(struct tape_device *device) | |||
1218 | tape_state_set(device, TS_IN_USE); | 1218 | tape_state_set(device, TS_IN_USE); |
1219 | rc = 0; | 1219 | rc = 0; |
1220 | } | 1220 | } |
1221 | spin_unlock(get_ccwdev_lock(device->cdev)); | 1221 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1222 | return rc; | 1222 | return rc; |
1223 | } | 1223 | } |
1224 | 1224 | ||
@@ -1228,11 +1228,11 @@ tape_open(struct tape_device *device) | |||
1228 | int | 1228 | int |
1229 | tape_release(struct tape_device *device) | 1229 | tape_release(struct tape_device *device) |
1230 | { | 1230 | { |
1231 | spin_lock(get_ccwdev_lock(device->cdev)); | 1231 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
1232 | if (device->tape_state == TS_IN_USE) | 1232 | if (device->tape_state == TS_IN_USE) |
1233 | tape_state_set(device, TS_UNUSED); | 1233 | tape_state_set(device, TS_UNUSED); |
1234 | module_put(device->discipline->owner); | 1234 | module_put(device->discipline->owner); |
1235 | spin_unlock(get_ccwdev_lock(device->cdev)); | 1235 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1236 | return 0; | 1236 | return 0; |
1237 | } | 1237 | } |
1238 | 1238 | ||
diff --git a/drivers/s390/cio/qdio_debug.c b/drivers/s390/cio/qdio_debug.c index b5390821434f..f05590355be8 100644 --- a/drivers/s390/cio/qdio_debug.c +++ b/drivers/s390/cio/qdio_debug.c | |||
@@ -20,6 +20,7 @@ static struct dentry *debugfs_root; | |||
20 | #define MAX_DEBUGFS_QUEUES 32 | 20 | #define MAX_DEBUGFS_QUEUES 32 |
21 | static struct dentry *debugfs_queues[MAX_DEBUGFS_QUEUES] = { NULL }; | 21 | static struct dentry *debugfs_queues[MAX_DEBUGFS_QUEUES] = { NULL }; |
22 | static DEFINE_MUTEX(debugfs_mutex); | 22 | static DEFINE_MUTEX(debugfs_mutex); |
23 | #define QDIO_DEBUGFS_NAME_LEN 40 | ||
23 | 24 | ||
24 | void qdio_allocate_do_dbf(struct qdio_initialize *init_data) | 25 | void qdio_allocate_do_dbf(struct qdio_initialize *init_data) |
25 | { | 26 | { |
@@ -152,17 +153,6 @@ static int qstat_seq_open(struct inode *inode, struct file *filp) | |||
152 | filp->f_path.dentry->d_inode->i_private); | 153 | filp->f_path.dentry->d_inode->i_private); |
153 | } | 154 | } |
154 | 155 | ||
155 | static void get_queue_name(struct qdio_q *q, struct ccw_device *cdev, char *name) | ||
156 | { | ||
157 | memset(name, 0, sizeof(name)); | ||
158 | sprintf(name, "%s", dev_name(&cdev->dev)); | ||
159 | if (q->is_input_q) | ||
160 | sprintf(name + strlen(name), "_input"); | ||
161 | else | ||
162 | sprintf(name + strlen(name), "_output"); | ||
163 | sprintf(name + strlen(name), "_%d", q->nr); | ||
164 | } | ||
165 | |||
166 | static void remove_debugfs_entry(struct qdio_q *q) | 156 | static void remove_debugfs_entry(struct qdio_q *q) |
167 | { | 157 | { |
168 | int i; | 158 | int i; |
@@ -189,14 +179,17 @@ static struct file_operations debugfs_fops = { | |||
189 | static void setup_debugfs_entry(struct qdio_q *q, struct ccw_device *cdev) | 179 | static void setup_debugfs_entry(struct qdio_q *q, struct ccw_device *cdev) |
190 | { | 180 | { |
191 | int i = 0; | 181 | int i = 0; |
192 | char name[40]; | 182 | char name[QDIO_DEBUGFS_NAME_LEN]; |
193 | 183 | ||
194 | while (debugfs_queues[i] != NULL) { | 184 | while (debugfs_queues[i] != NULL) { |
195 | i++; | 185 | i++; |
196 | if (i >= MAX_DEBUGFS_QUEUES) | 186 | if (i >= MAX_DEBUGFS_QUEUES) |
197 | return; | 187 | return; |
198 | } | 188 | } |
199 | get_queue_name(q, cdev, name); | 189 | snprintf(name, QDIO_DEBUGFS_NAME_LEN, "%s_%s_%d", |
190 | dev_name(&cdev->dev), | ||
191 | q->is_input_q ? "input" : "output", | ||
192 | q->nr); | ||
200 | debugfs_queues[i] = debugfs_create_file(name, S_IFREG | S_IRUGO | S_IWUSR, | 193 | debugfs_queues[i] = debugfs_create_file(name, S_IFREG | S_IRUGO | S_IWUSR, |
201 | debugfs_root, q, &debugfs_fops); | 194 | debugfs_root, q, &debugfs_fops); |
202 | } | 195 | } |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index a50682d2a0fa..7c8659151993 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -1083,7 +1083,6 @@ void qdio_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1083 | case -EIO: | 1083 | case -EIO: |
1084 | sprintf(dbf_text, "ierr%4x", irq_ptr->schid.sch_no); | 1084 | sprintf(dbf_text, "ierr%4x", irq_ptr->schid.sch_no); |
1085 | QDIO_DBF_TEXT2(1, setup, dbf_text); | 1085 | QDIO_DBF_TEXT2(1, setup, dbf_text); |
1086 | qdio_int_error(cdev); | ||
1087 | return; | 1086 | return; |
1088 | case -ETIMEDOUT: | 1087 | case -ETIMEDOUT: |
1089 | sprintf(dbf_text, "qtoh%4x", irq_ptr->schid.sch_no); | 1088 | sprintf(dbf_text, "qtoh%4x", irq_ptr->schid.sch_no); |
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index 2afd47eefe74..f8a4bb20f41a 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c | |||
@@ -439,7 +439,7 @@ static int corgi_bl_update_status(struct backlight_device *bd) | |||
439 | return corgi_bl_set_intensity(lcd, intensity); | 439 | return corgi_bl_set_intensity(lcd, intensity); |
440 | } | 440 | } |
441 | 441 | ||
442 | void corgibl_limit_intensity(int limit) | 442 | void corgi_lcd_limit_intensity(int limit) |
443 | { | 443 | { |
444 | if (limit) | 444 | if (limit) |
445 | corgibl_flags |= CORGIBL_BATTLOW; | 445 | corgibl_flags |= CORGIBL_BATTLOW; |
@@ -448,7 +448,7 @@ void corgibl_limit_intensity(int limit) | |||
448 | 448 | ||
449 | backlight_update_status(the_corgi_lcd->bl_dev); | 449 | backlight_update_status(the_corgi_lcd->bl_dev); |
450 | } | 450 | } |
451 | EXPORT_SYMBOL(corgibl_limit_intensity); | 451 | EXPORT_SYMBOL(corgi_lcd_limit_intensity); |
452 | 452 | ||
453 | static struct backlight_ops corgi_bl_ops = { | 453 | static struct backlight_ops corgi_bl_ops = { |
454 | .get_brightness = corgi_bl_get_intensity, | 454 | .get_brightness = corgi_bl_get_intensity, |
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 9ce1ab6c268d..1e3b934a4cf7 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -774,7 +774,7 @@ void xen_poll_irq(int irq) | |||
774 | 774 | ||
775 | poll.nr_ports = 1; | 775 | poll.nr_ports = 1; |
776 | poll.timeout = 0; | 776 | poll.timeout = 0; |
777 | poll.ports = &evtchn; | 777 | set_xen_guest_handle(poll.ports, &evtchn); |
778 | 778 | ||
779 | if (HYPERVISOR_sched_op(SCHEDOP_poll, &poll) != 0) | 779 | if (HYPERVISOR_sched_op(SCHEDOP_poll, &poll) != 0) |
780 | BUG(); | 780 | BUG(); |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index d0e87cbe157c..9b91617b9582 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -39,8 +39,6 @@ static int xen_suspend(void *data) | |||
39 | 39 | ||
40 | BUG_ON(!irqs_disabled()); | 40 | BUG_ON(!irqs_disabled()); |
41 | 41 | ||
42 | load_cr3(swapper_pg_dir); | ||
43 | |||
44 | err = device_power_down(PMSG_SUSPEND); | 42 | err = device_power_down(PMSG_SUSPEND); |
45 | if (err) { | 43 | if (err) { |
46 | printk(KERN_ERR "xen_suspend: device_power_down failed: %d\n", | 44 | printk(KERN_ERR "xen_suspend: device_power_down failed: %d\n", |
diff --git a/drivers/xen/xencomm.c b/drivers/xen/xencomm.c index 797cb4e31f07..a240b2c20b99 100644 --- a/drivers/xen/xencomm.c +++ b/drivers/xen/xencomm.c | |||
@@ -23,13 +23,7 @@ | |||
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <xen/xencomm.h> | 24 | #include <xen/xencomm.h> |
25 | #include <xen/interface/xen.h> | 25 | #include <xen/interface/xen.h> |
26 | #ifdef __ia64__ | 26 | #include <asm/xen/xencomm.h> /* for xencomm_is_phys_contiguous() */ |
27 | #include <asm/xen/xencomm.h> /* for is_kern_addr() */ | ||
28 | #endif | ||
29 | |||
30 | #ifdef HAVE_XEN_PLATFORM_COMPAT_H | ||
31 | #include <xen/platform-compat.h> | ||
32 | #endif | ||
33 | 27 | ||
34 | static int xencomm_init(struct xencomm_desc *desc, | 28 | static int xencomm_init(struct xencomm_desc *desc, |
35 | void *buffer, unsigned long bytes) | 29 | void *buffer, unsigned long bytes) |
@@ -157,20 +151,11 @@ static int xencomm_create(void *buffer, unsigned long bytes, | |||
157 | return 0; | 151 | return 0; |
158 | } | 152 | } |
159 | 153 | ||
160 | /* check if memory address is within VMALLOC region */ | ||
161 | static int is_phys_contiguous(unsigned long addr) | ||
162 | { | ||
163 | if (!is_kernel_addr(addr)) | ||
164 | return 0; | ||
165 | |||
166 | return (addr < VMALLOC_START) || (addr >= VMALLOC_END); | ||
167 | } | ||
168 | |||
169 | static struct xencomm_handle *xencomm_create_inline(void *ptr) | 154 | static struct xencomm_handle *xencomm_create_inline(void *ptr) |
170 | { | 155 | { |
171 | unsigned long paddr; | 156 | unsigned long paddr; |
172 | 157 | ||
173 | BUG_ON(!is_phys_contiguous((unsigned long)ptr)); | 158 | BUG_ON(!xencomm_is_phys_contiguous((unsigned long)ptr)); |
174 | 159 | ||
175 | paddr = (unsigned long)xencomm_pa(ptr); | 160 | paddr = (unsigned long)xencomm_pa(ptr); |
176 | BUG_ON(paddr & XENCOMM_INLINE_FLAG); | 161 | BUG_ON(paddr & XENCOMM_INLINE_FLAG); |
@@ -202,7 +187,7 @@ struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes) | |||
202 | int rc; | 187 | int rc; |
203 | struct xencomm_desc *desc; | 188 | struct xencomm_desc *desc; |
204 | 189 | ||
205 | if (is_phys_contiguous((unsigned long)ptr)) | 190 | if (xencomm_is_phys_contiguous((unsigned long)ptr)) |
206 | return xencomm_create_inline(ptr); | 191 | return xencomm_create_inline(ptr); |
207 | 192 | ||
208 | rc = xencomm_create(ptr, bytes, &desc, GFP_KERNEL); | 193 | rc = xencomm_create(ptr, bytes, &desc, GFP_KERNEL); |
@@ -219,7 +204,7 @@ struct xencomm_handle *__xencomm_map_no_alloc(void *ptr, unsigned long bytes, | |||
219 | int rc; | 204 | int rc; |
220 | struct xencomm_desc *desc = NULL; | 205 | struct xencomm_desc *desc = NULL; |
221 | 206 | ||
222 | if (is_phys_contiguous((unsigned long)ptr)) | 207 | if (xencomm_is_phys_contiguous((unsigned long)ptr)) |
223 | return xencomm_create_inline(ptr); | 208 | return xencomm_create_inline(ptr); |
224 | 209 | ||
225 | rc = xencomm_create_mini(ptr, bytes, xc_desc, | 210 | rc = xencomm_create_mini(ptr, bytes, xc_desc, |