static struct device_type disk_type;
-#ifdef CONFIG_DEBUG_BLOCK_EXT_DEVT
-int blk_mangle_devt;
-module_param_named(mangle_devt, blk_mangle_devt, bool, 0444);
-EXPORT_SYMBOL_GPL(blk_mangle_devt);
-#endif
-
/**
* disk_get_part - get partition
* @disk: disk to look partition from
#ifdef CONFIG_DEBUG_BLOCK_EXT_DEVT
int i;
- if (!blk_mangle_devt)
- return minor;
-
for (i = 0; i < MINORBITS / 2; i++) {
int low = minor & (1 << i);
int high = minor & (1 << (MINORBITS - 1 - i));
obj-y += base/ block/ misc/ mfd/
obj-$(CONFIG_NUBUS) += nubus/
obj-y += macintosh/
+obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_SCSI) += scsi/
obj-$(CONFIG_ATA) += ata/
obj-$(CONFIG_MTD) += mtd/
obj-$(CONFIG_SPI) += spi/
-obj-$(CONFIG_IDE) += ide/
obj-y += net/
# gpu/ comes after char for AGP vs DRM startup
return true;
}
-static void ahci_aspire_3810t_workaround(struct ata_host *host)
-{
- static const struct dmi_system_id sysids[] = {
- /*
- * Aspire 3810T issues a bunch of SATA enable commands
- * via _GTF including an invalid one and one which is
- * rejected by the device. Among the successful ones
- * is FPDMA non-zero offset enable which when enabled
- * only on the drive side leads to NCQ command
- * failures. Disable NCQ.
- */
- {
- .ident = "Aspire 3810T",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3810T"),
- },
- },
- { }
- };
- int i;
-
- if (dmi_check_system(sysids)) {
- dev_printk(KERN_INFO, host->dev,
- "Aspire 3810T detected, disabling NCQ\n");
-
- for (i = 0; i < host->n_ports; i++)
- host->ports[i]->flags &= ~ATA_FLAG_NCQ;
- }
-}
-
static bool ahci_broken_system_poweroff(struct pci_dev *pdev)
{
static const struct dmi_system_id broken_systems[] = {
/* apply gtf filter quirk */
ahci_gtf_filter_workaround(host);
- ahci_aspire_3810t_workaround(host);
-
/* initialize adapter */
rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64);
if (rc)
return 0;
}
-static irqreturn_t piix_interrupt(int irq, void *dev_instance)
-{
- struct ata_host *host = dev_instance;
- unsigned int i;
- unsigned int handled = 0;
- unsigned long flags;
-
- spin_lock_irqsave(&host->lock, flags);
-
- for (i = 0; i < host->n_ports; i++) {
- struct ata_port *ap = host->ports[i];
- struct ata_queued_cmd *qc;
- u8 host_stat;
-
- if (ata_port_is_dummy(ap))
- continue;
-
- qc = ata_qc_from_tag(ap, ap->link.active_tag);
- if (qc && !(qc->tf.flags & ATA_TFLAG_POLLING)) {
- handled |= ata_sff_host_intr(ap, qc);
- continue;
- }
-
- /*
- * Control reaches here if HSM is not expecting IRQ.
- * If the controller is actually asserting IRQ line,
- * this will lead to nobody cared. Fortuantely,
- * DMA_INTR of PIIX is set whenever IDEIRQ is set so
- * it can be used to detect spurious IRQs. As the
- * driver is not expecting IRQ at all, clearing IRQ
- * here won't lead to loss of IRQ event.
- */
- if (unlikely(!ap->ioaddr.bmdma_addr))
- continue;
-
- host_stat = ap->ops->bmdma_status(ap);
- if (!(host_stat & ATA_DMA_INTR))
- continue;
-
- if (printk_ratelimit())
- ata_port_printk(ap, KERN_INFO,
- "clearing spurious IRQ\n");
- ap->ops->sff_check_status(ap);
- ap->ops->sff_irq_clear(ap);
- handled |= 1;
- }
-
- spin_unlock_irqrestore(&host->lock, flags);
-
- return IRQ_RETVAL(handled);
-}
-
static int piix_sidpr_scr_write(struct ata_link *link,
unsigned int reg, u32 val)
{
host->flags |= ATA_HOST_PARALLEL_SCAN;
pci_set_master(pdev);
- return ata_pci_sff_activate_host(host, piix_interrupt, &piix_sht);
+ return ata_pci_sff_activate_host(host, ata_sff_interrupt, &piix_sht);
}
static void piix_remove_one(struct pci_dev *pdev)
#include <linux/hdreg.h>
#include <linux/dmi.h>
+#if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT)
#define IDE_DISK_MINORS (1 << PARTN_BITS)
+#else
+#define IDE_DISK_MINORS 0
+#endif
#include "ide-disk.h"
#include "ide-floppy.h"
goto failed;
}
- g = alloc_disk_node(blk_mangle_devt ? 0 : IDE_DISK_MINORS,
- hwif_to_node(drive->hwif));
+ g = alloc_disk_node(IDE_DISK_MINORS, hwif_to_node(drive->hwif));
if (!g)
goto out_free_idkp;
set_capacity(g, ide_gd_capacity(drive));
- g->minors = blk_mangle_devt ? 0 : IDE_DISK_MINORS;
+ g->minors = IDE_DISK_MINORS;
g->driverfs_dev = &drive->gendev;
g->flags |= GENHD_FL_EXT_DEVT;
if (drive->dev_flags & IDE_DFLAG_REMOVABLE)
MODULE_ALIAS_SCSI_DEVICE(TYPE_MOD);
MODULE_ALIAS_SCSI_DEVICE(TYPE_RBC);
+#if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT)
#define SD_MINORS 16
+#else
+#define SD_MINORS 0
+#endif
static int sd_revalidate_disk(struct gendisk *);
static int sd_probe(struct device *);
if (index < SD_MAX_DISKS) {
gd->major = sd_major((index & 0xf0) >> 4);
gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
- gd->minors = blk_mangle_devt ? 0 : SD_MINORS;
+ gd->minors = SD_MINORS;
}
gd->fops = &sd_fops;
gd->private_data = &sdkp->driver;
if (!sdkp)
goto out;
- gd = alloc_disk(blk_mangle_devt ? 0 : SD_MINORS);
+ gd = alloc_disk(SD_MINORS);
if (!gd)
goto out_free;
extern struct kobject *block_depr;
extern struct class block_class;
-#ifdef CONFIG_DEBUG_BLOCK_EXT_DEVT
-extern int blk_mangle_devt;
-#else
-#define blk_mangle_devt 0
-#endif
-
enum {
/* These three have identical behaviour; use the second one if DOS FDISK gets
confused about extended/logical partitions starting past cylinder 1023. */