Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144844
b: refs/heads/master
c: 842faa6
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed May 11, 2009
1 parent 35fef43 commit cae7ddb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2b79bc4f7ebbd5af3c8b867968f9f15602d5f802
refs/heads/master: 842faa6c1a1d6faddf3377948e5cf214812c6c90
21 changes: 17 additions & 4 deletions trunk/drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2783,13 +2783,24 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
} else if (dev->class == ATA_DEV_UNKNOWN &&
ehc->tries[dev->devno] &&
ata_class_enabled(ehc->classes[dev->devno])) {
/* Temporarily set dev->class, it will be
* permanently set once all configurations are
* complete. This is necessary because new
* device configuration is done in two
* separate loops.
*/
dev->class = ehc->classes[dev->devno];

if (dev->class == ATA_DEV_PMP)
rc = sata_pmp_attach(dev);
else
rc = ata_dev_read_id(dev, &dev->class,
readid_flags, dev->id);

/* read_id might have changed class, store and reset */
ehc->classes[dev->devno] = dev->class;
dev->class = ATA_DEV_UNKNOWN;

switch (rc) {
case 0:
/* clear error info accumulated during probe */
Expand All @@ -2799,13 +2810,11 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
case -ENOENT:
/* IDENTIFY was issued to non-existent
* device. No need to reset. Just
* thaw and kill the device.
* thaw and ignore the device.
*/
ata_eh_thaw_port(ap);
dev->class = ATA_DEV_UNKNOWN;
break;
default:
dev->class = ATA_DEV_UNKNOWN;
goto err;
}
}
Expand All @@ -2826,11 +2835,15 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
dev->class == ATA_DEV_PMP)
continue;

dev->class = ehc->classes[dev->devno];

ehc->i.flags |= ATA_EHI_PRINTINFO;
rc = ata_dev_configure(dev);
ehc->i.flags &= ~ATA_EHI_PRINTINFO;
if (rc)
if (rc) {
dev->class = ATA_DEV_UNKNOWN;
goto err;
}

spin_lock_irqsave(ap->lock, flags);
ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
Expand Down
13 changes: 4 additions & 9 deletions trunk/drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
#define DMA_32BIT_PFN IOVA_PFN(DMA_BIT_MASK(32))
#define DMA_64BIT_PFN IOVA_PFN(DMA_BIT_MASK(64))

#ifndef PHYSICAL_PAGE_MASK
#define PHYSICAL_PAGE_MASK PAGE_MASK
#endif

/* global iommu list, set NULL for ignored DMAR units */
static struct intel_iommu **g_iommus;

Expand Down Expand Up @@ -1220,7 +1216,7 @@ static void dmar_init_reserved_ranges(void)
if (!r->flags || !(r->flags & IORESOURCE_MEM))
continue;
addr = r->start;
addr &= PHYSICAL_PAGE_MASK;
addr &= PAGE_MASK;
size = r->end - addr;
size = PAGE_ALIGN(size);
iova = reserve_iova(&reserved_iova_list, IOVA_PFN(addr),
Expand Down Expand Up @@ -2177,8 +2173,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
* is not a big problem
*/
ret = domain_page_mapping(domain, start_paddr,
((u64)paddr) & PHYSICAL_PAGE_MASK,
size, prot);
((u64)paddr) & PAGE_MASK, size, prot);
if (ret)
goto error;

Expand Down Expand Up @@ -2468,8 +2463,8 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist, int ne
addr = page_to_phys(sg_page(sg)) + sg->offset;
size = aligned_size((u64)addr, sg->length);
ret = domain_page_mapping(domain, start_addr + offset,
((u64)addr) & PHYSICAL_PAGE_MASK,
size, prot);
((u64)addr) & PAGE_MASK,
size, prot);
if (ret) {
/* clear the page */
dma_pte_clear_range(domain, start_addr,
Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/fcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,11 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
{
if (unlikely(newfd == oldfd)) { /* corner case */
struct files_struct *files = current->files;
int retval = oldfd;

rcu_read_lock();
if (!fcheck_files(files, oldfd))
retval = -EBADF;
oldfd = -EBADF;
rcu_read_unlock();
return retval;
return oldfd;
}
return sys_dup3(oldfd, newfd, 0);
}
Expand Down

0 comments on commit cae7ddb

Please sign in to comment.