From 45d8f68705cf2bbf0f3117ccc61eea95f0171baa Mon Sep 17 00:00:00 2001 From: mav Date: Sat, 15 Aug 2015 21:46:02 +0000 Subject: Remove UMA allocation of ATA requests. After CAM replaced old ATA stack, this driver processes no more then one request at a time per channel. Using UMA after that is overkill, so replace it with simple preallocation of one request per channel. MFC after: 2 weeks --- sys/dev/ata/ata-all.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'sys/dev/ata/ata-all.h') diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h index 19cb7ef..cf8ed78 100644 --- a/sys/dev/ata/ata-all.h +++ b/sys/dev/ata/ata-all.h @@ -450,6 +450,7 @@ struct ata_channel { struct ata_cam_device curr[16]; /* Current settings */ int requestsense; /* CCB waiting for SENSE. */ struct callout poll_callout; /* Periodic status poll. */ + struct ata_request request; }; /* disk bay/enclosure related */ @@ -507,14 +508,6 @@ int ata_sata_getrev(device_t dev, int target); int ata_request2fis_h2d(struct ata_request *request, u_int8_t *fis); void ata_pm_identify(device_t dev); -/* macros for alloc/free of struct ata_request */ -extern uma_zone_t ata_request_zone; -#define ata_alloc_request() uma_zalloc(ata_request_zone, M_NOWAIT | M_ZERO) -#define ata_free_request(request) { \ - if (!(request->flags & ATA_R_DANGER2)) \ - uma_zfree(ata_request_zone, request); \ - } - MALLOC_DECLARE(M_ATA); /* misc newbus defines */ -- cgit v1.1